X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghc.mk;h=df07430596a37f395960d8fa0ddd528361f3f5b2;hb=2247d4c49e705ee88f5249368e718c12897fe103;hp=f6530a6721a7eeafe77c4ebea638bb53f8e97390;hpb=b8384ce5da4738c0a6d3eaf11de03cab3ddd3cd6;p=ghc-hetmet.git diff --git a/compiler/ghc.mk b/compiler/ghc.mk index f6530a6..df07430 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -136,12 +136,6 @@ ifeq "$(RelocatableBuild)" "YES" else @echo 'cRelocatableBuild = False' >> $@ endif - @echo 'cUseArchivesForGhci :: Bool' >> $@ -ifeq "$(UseArchivesForGhci)" "YES" - @echo 'cUseArchivesForGhci = True' >> $@ -else - @echo 'cUseArchivesForGhci = False' >> $@ -endif @echo 'cLibFFI :: Bool' >> $@ ifeq "$(UseLibFFIForAdjustors)" "YES" @echo 'cLibFFI = True' >> $@ @@ -363,39 +357,20 @@ 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 -ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" -# The #include is vital for the via-C route with older compilers, else the C -# compiler doesn't realise that the stcall foreign imports are indeed -# stdcall, and doesn't generate the Foo@8 name for them -# It's only important for older compilers, and in fact newer compilers -# will give a warning if the -#include flag is used. We therefore only -# do it for stage1, and only for < 6.11. -ifeq "$(ghc_ge_611)" "NO" -compiler_stage1_CONFIGURE_OPTS += --ghc-option='-\#include' \ - --ghc-option='""' \ - --ghc-option='-\#include' \ - --ghc-option='""' -endif -endif - -# ghc_strlen percolates through so many modules that it is easier to get its -# prototype via a global option instead of a myriad of per-file OPTIONS. -# Again, this is only done for older compilers. -ifeq "$(ghc_ge_611)" "NO" -compiler_stage1_CONFIGURE_OPTS += --ghc-options='-\#include "cutils.h"' -endif - compiler_stage3_CONFIGURE_OPTS := $(compiler_stage2_CONFIGURE_OPTS) compiler_stage1_CONFIGURE_OPTS += --ghc-option=-DSTAGE=1 @@ -467,6 +442,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)