Adding a "release" setting in build.mk.sample (and some other build system questions)
Ömer Sinan Ağacan
omeragacan at gmail.com
Thu Jan 28 23:50:38 UTC 2016
I'm trying to figure out how to generate a release build. I thought it should
be "perf" setting, but then I realized ghc-stage1 is called with -O (instead of
-O2) when building stage2 with perf setting. So either perf is not the release
setting, or I need stage3 which is probably compiled with stage2 using -O2?
In any case, it'd be great to document this process of generating a release
build in build.mk.sample. If it's "perf" setting, then maybe we can rename it
to "release" or at least add a comment saying that that's the release build and
you should wait until stage3 is done.
Another thing that always confuses me is these settings:
SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O
GhcStage2HcOpts = -O2
GhcLibHcOpts = -O2
As far as I can see, there's no documentation about these in the source tree. I
figured that `GhcStage1HcOpts` is passed to system GHC when compiling stage1,
and `GhcStage2Hcopts` is passed to ghc-stage1 when compiling stage 2. The lib
one is obvious, and it's passed to stage 1 as libs are built using stage 1. But
I still don't understand how is `SRC_HC_OPTS` is used, and what is used when
building stage 3.
More information about the ghc-devs
mailing list