diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-06-29 22:42:42 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2015-07-07 12:40:41 +0200 |
commit | 37de4ad76b75d403e6a8dae9539af08c859d46a4 (patch) | |
tree | 33df047c78357f0ed1ded81cca5b4bd1e9d17c3d /mk/build.mk.sample | |
parent | db530f18784fe1a29394470a0edc56702727bcde (diff) | |
download | haskell-37de4ad76b75d403e6a8dae9539af08c859d46a4.tar.gz |
Build system: don't set GhcLibWays explicitly in build.mk.sample (#10536)
We used to have the following in mk/build.mk.sample:
GhcLibWays = $(if $(filter $(DYNAMIC_GHC_PROGRAMS),YES),v dyn,v)
This commit removes that statement for the following reasons:
1) It depends on the variable DYNAMIC_GHC_PROGRAMS, which is set later
in the file for some BuildFlavours. Although this works because
`make` does multiple passes when reading Makefiles, it is confusing
to users [1]. Instead, test for DYNAMIC_GHC_PROGRAMS in
mk/config.mk.in.
2) Although it looks like that line is about compiling the `dyn` way,
its purpose is really to not build the `prof` way. This commit
introduces the variable BUILD_PROF_LIBS, to make this more
explicit.
This simplifies mk/build.mk.sample and mk/validate-settings.mk.
Note that setting GhcLibWays explicitly still works, and
DYNAMIC_GHC_PROGRAMS=NO in build.mk does not build the `dyn` way.
[1] https://mail.haskell.org/pipermail/ghc-devs/2014-December/007725.html
Differential Revision: https://phabricator.haskell.org/D1021
Diffstat (limited to 'mk/build.mk.sample')
-rw-r--r-- | mk/build.mk.sample | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/mk/build.mk.sample b/mk/build.mk.sample index 7969b40876..3f9770226b 100644 --- a/mk/build.mk.sample +++ b/mk/build.mk.sample @@ -72,8 +72,6 @@ V = 1 # Uncomment the following line to enable building DPH #BUILD_DPH=YES -GhcLibWays = $(if $(filter $(DYNAMIC_GHC_PROGRAMS),YES),v dyn,v) - # Uncomment the following to force `integer-gmp` to use the in-tree GMP 5.0.4 # (other sometimes useful configure-options: `--with-gmp-{includes,libraries}`) #libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-intree-gmp @@ -84,40 +82,34 @@ ifeq "$(BuildFlavour)" "perf" # perf matches the default settings, repeated here for comparison: -SRC_HC_OPTS = -O -H64m -GhcStage1HcOpts = -O -GhcStage2HcOpts = -O2 -GhcLibHcOpts = -O2 +SRC_HC_OPTS = -O -H64m +GhcStage1HcOpts = -O +GhcStage2HcOpts = -O2 +GhcLibHcOpts = -O2 +BUILD_PROF_LIBS = YES #SplitObjs #HADDOCK_DOCS #BUILD_DOCBOOK_HTML #BUILD_DOCBOOK_PS #BUILD_DOCBOOK_PDF -GhcLibWays = v -GhcLibWays += p -ifeq "$(PlatformSupportsSharedLibs)" "YES" -GhcLibWays += dyn -endif - endif # ---------------- Perf build using LLVM -------------------------------------- ifeq "$(BuildFlavour)" "perf-llvm" -SRC_HC_OPTS = -O -H64m -fllvm -GhcStage1HcOpts = -O -fllvm -GhcStage2HcOpts = -O2 -fllvm -GhcLibHcOpts = -O2 +SRC_HC_OPTS = -O -H64m -fllvm +GhcStage1HcOpts = -O -fllvm +GhcStage2HcOpts = -O2 -fllvm +GhcLibHcOpts = -O2 +BUILD_PROF_LIBS = YES #SplitObjs #HADDOCK_DOCS #BUILD_DOCBOOK_HTML #BUILD_DOCBOOK_PS #BUILD_DOCBOOK_PDF -GhcLibWays += p - endif # ------- A Perf build configured for cross-compilation ---------------------- @@ -128,14 +120,13 @@ SRC_HC_OPTS = -O -H64m -fllvm GhcStage1HcOpts = -O2 GhcStage2HcOpts = -O2 -fllvm GhcLibHcOpts = -O2 +BUILD_PROF_LIBS = YES #SplitObjs HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO BUILD_DOCBOOK_PS = NO BUILD_DOCBOOK_PDF = NO -GhcLibWays += p - INTEGER_LIBRARY = integer-simple Stage1Only = YES DYNAMIC_BY_DEFAULT = NO @@ -151,6 +142,7 @@ SRC_HC_OPTS = -H64m -O0 GhcStage1HcOpts = -O GhcStage2HcOpts = -O0 GhcLibHcOpts = -O0 +BUILD_PROF_LIBS = NO SplitObjs = NO HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO @@ -167,6 +159,7 @@ SRC_HC_OPTS = -H64m -O0 GhcStage1HcOpts = -O GhcStage2HcOpts = -O0 GhcLibHcOpts = -O +BUILD_PROF_LIBS = NO SplitObjs = NO HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO @@ -183,6 +176,7 @@ SRC_HC_OPTS = -H64m -O0 -fllvm GhcStage1HcOpts = -O -fllvm GhcStage2HcOpts = -O0 -fllvm GhcLibHcOpts = -O -fllvm +BUILD_PROF_LIBS = NO SplitObjs = NO HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO @@ -199,6 +193,7 @@ SRC_HC_OPTS = -H64m -O0 GhcStage1HcOpts = -O GhcStage2HcOpts = -O0 -fllvm GhcLibHcOpts = -O -fllvm +BUILD_PROF_LIBS = NO SplitObjs = NO HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO @@ -220,13 +215,13 @@ SRC_HC_OPTS = -H64m -O0 GhcStage1HcOpts = -O GhcStage2HcOpts = -O GhcLibHcOpts = -O +BUILD_PROF_LIBS = YES SplitObjs = NO HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO BUILD_DOCBOOK_PS = NO BUILD_DOCBOOK_PDF = NO -GhcLibWays += p GhcProfiled = YES endif @@ -239,6 +234,7 @@ SRC_HC_OPTS = -H64m -O GhcStage1HcOpts = -O0 -DDEBUG GhcStage2HcOpts = -O GhcLibHcOpts = -O -dcore-lint +BUILD_PROF_LIBS = NO SplitObjs = NO HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO @@ -257,6 +253,7 @@ SRC_HC_OPTS = -H64m -O GhcStage1HcOpts = -O GhcStage2HcOpts = -O0 -DDEBUG GhcLibHcOpts = -O -dcore-lint +BUILD_PROF_LIBS = NO SplitObjs = NO HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO @@ -275,6 +272,7 @@ SRC_HC_OPTS = -O -H64m GhcStage1HcOpts = -O GhcStage2HcOpts = -O0 GhcLibHcOpts = -O2 +BUILD_PROF_LIBS = NO SplitObjs = NO HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO @@ -291,6 +289,7 @@ SRC_HC_OPTS = -O -H64m GhcStage1HcOpts = -O -fllvm GhcStage2HcOpts = -O0 -fllvm GhcLibHcOpts = -O2 -fllvm +BUILD_PROF_LIBS = NO SplitObjs = NO HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO @@ -307,6 +306,7 @@ SRC_HC_OPTS = -O -H64m GhcStage1HcOpts = -O GhcStage2HcOpts = -O0 GhcLibHcOpts = -O2 +BUILD_PROF_LIBS = NO SplitObjs = NO HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO |