X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghc.mk;h=60a65d44e7de6a86a428acfd9e4d25103a8764a3;hb=b633499b3a9508fce26b622f2d0cd836290e9503;hp=60123e9162a8a891163c2f4ccfcfcde3eead09aa;hpb=aa5e377a4532df79dadafdb385a77d2e548ef32a;p=ghc-hetmet.git diff --git a/compiler/ghc.mk b/compiler/ghc.mk index 60123e9..60a65d4 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -70,6 +70,10 @@ compiler/stage%/build/Config.hs : mk/config.mk mk/project.mk | $$(dir $$@)/. @echo 'cBooterVersion = "$(GhcVersion)"' >> $@ @echo 'cStage :: String' >> $@ @echo 'cStage = show (STAGE :: Int)' >> $@ + @echo 'cCcOpts :: [String]' >> $@ + @echo 'cCcOpts = words "$(CONF_CC_OPTS_STAGE$*)"' >> $@ + @echo 'cLdOpts :: [String]' >> $@ + @echo 'cLdOpts = words "$(CONF_LD_OPTS_STAGE$*)"' >> $@ @echo 'cIntegerLibrary :: String' >> $@ @echo 'cIntegerLibrary = "$(INTEGER_LIBRARY)"' >> $@ @echo 'cSplitObjs :: String' >> $@ @@ -353,14 +357,17 @@ compiler_CONFIGURE_OPTS += --ghc-option=-DNO_REGS endif # If we're profiling GHC then we want lots of SCCs, so -auto-all -# We also don't want to waste time building the non-profiling library, -# either normally or for ghci. Unfortunately this means that we have to -# tell ghc-pkg --force as it gets upset when libHSghc-6.9.a doesn't -# exist. +# We also don't want to waste time building the non-profiling library. +# Unfortunately this means that we have to tell ghc-pkg --force as it +# gets upset when libHSghc-6.9.a doesn't exist. ifeq "$(GhcProfiled)" "YES" compiler_stage2_CONFIGURE_OPTS += --ghc-option=-auto-all -compiler_stage2_CONFIGURE_OPTS += --disable-library-vanilla -compiler_stage2_CONFIGURE_OPTS += --disable-library-for-ghci +# We seem to still build the vanilla libraries even if we say +# --disable-library-vanilla, but installation then fails, as Cabal +# doesn't copy the vanilla .hi files, but ghc-pkg complains about +# their absence when we register the package. So for now, we just +# leave the vanilla libraries enabled. +# compiler_stage2_CONFIGURE_OPTS += --disable-library-vanilla compiler_stage2_CONFIGURE_OPTS += --ghc-pkg-option=--force endif @@ -457,6 +464,16 @@ $(eval $(call build-package,compiler,stage1,0)) $(eval $(call build-package,compiler,stage2,1)) $(eval $(call build-package,compiler,stage3,2)) +# after build-package, because that adds --enable-library-for-ghci +# to compiler_stage*_CONFIGURE_OPTS: +# We don't build the GHCi library for the ghc package. We can load it +# the .a file instead, and as object splitting isn't on for the ghc +# package this isn't much slower.However, not building the package saves +# a significant chunk of disk space. +compiler_stage1_CONFIGURE_OPTS += --disable-library-for-ghci +compiler_stage2_CONFIGURE_OPTS += --disable-library-for-ghci +compiler_stage3_CONFIGURE_OPTS += --disable-library-for-ghci + # after build-package, because that sets compiler_stage1_HC_OPTS: compiler_stage1_HC_OPTS += $(GhcStage1HcOpts) compiler_stage2_HC_OPTS += $(GhcStage2HcOpts)