Build system: put each BuildFlavour in a separate file (#10223)
ClosedPublic

Authored by thomie on Jul 7 2015, 2:06 PM.

Details

Summary

This allows easier diffing of different BuildFlavours, including mk/flavours/validate.mk.

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
thomie updated this revision to Diff 3467.Jul 7 2015, 2:06 PM
thomie retitled this revision from to Build system: use += instead of = in build.mk.sample (#10223).
thomie updated this object.
thomie edited the test plan for this revision. (Show Details)
thomie added a reviewer: int-e.
thomie updated the Trac tickets for this revision.
bgamari accepted this revision.Jul 7 2015, 2:39 PM
bgamari edited edge metadata.

Looks good to me.

This revision is now accepted and ready to land.Jul 7 2015, 2:39 PM
thomie abandoned this revision.Jul 7 2015, 4:30 PM

I have a better plan. I want to try the following:

  • Put each BuildFlavour in its own file in mk/BuildFlavours/
  • Let users import them by uncommenting a line in mk/build.mk
  • Extra flags can be added afterwards

The advantage is that we can then use vimdiff BuildFlavour1 BuildFlavour2 to compare BuildFlavours.

Speak up if you think this is a bad idea.

thomie updated this revision to Diff 3925.Aug 25 2015, 12:51 PM
thomie edited edge metadata.

Put each BuildFlavour in a separate file.

Please review.

This revision is now accepted and ready to land.Aug 25 2015, 12:51 PM
This revision now requires review to proceed.Aug 25 2015, 12:51 PM
thomie retitled this revision from Build system: use += instead of = in build.mk.sample (#10223) to Build system: put each BuildFlavour in a separate file (#10223).Aug 25 2015, 12:53 PM
thomie updated this object.
thomie edited edge metadata.

FYI: I just copy-pasted the BuildFlavours, and flipped -O and -H64m in a few places.

thomie updated this object.Aug 31 2015, 6:32 AM
thomie updated this revision to Diff 3992.Aug 31 2015, 6:33 AM

Move mk/validate-settings.mk to mk/flavours/validate.mk.

thomie updated this revision to Diff 3993.Aug 31 2015, 6:46 AM
thomie edited edge metadata.

Fix typo.

I think this is a lovely idea. I've never been very fond of the current BuildFlavour story.

One question inline.

mk/flavours/perf-llvm.mk
11

I don't understand why these lines are commented. Shouldn't we just assign them their default value to keep things explicit?

thomie added inline comments.Sep 2 2015, 7:21 AM
mk/flavours/perf-llvm.mk
11

Those problem is those default values are set by configure. For example, in mk/config.mk.in:

SplitObjs=$(SupportsSplitObjs)

The idea of the perf buildflavour is that it matches the default build. This is almost true, except for -H64m vs -H32m and STRIP_CMD=: vs STRIP_CMD=strip (that last one has performance effect actually). I intend to reconcile these differences later.

thomie added inline comments.Sep 2 2015, 7:24 AM
mk/flavours/perf-llvm.mk
11

This is a better example. In mk/config.mk.in we have:

BUILD_DOCBOOK_HTML       = @BUILD_DOCBOOK_HTML@
BUILD_DOCBOOK_PS         = @BUILD_DOCBOOK_PS@
BUILD_DOCBOOK_PDF        = @BUILD_DOCBOOK_PDF@

So we can only explicitly switch building the docs off for certain build flavours, not switch it on.

austin awarded a token.Sep 6 2015, 4:46 PM
austin accepted this revision.Sep 6 2015, 4:50 PM
austin edited edge metadata.

shipitquick

This revision is now accepted and ready to land.Sep 6 2015, 4:50 PM
This revision was automatically updated to reflect the committed changes.