diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-07-07 14:25:44 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-07-25 00:45:08 -0400 |
commit | 459afeb592d5ff6d338184f5ef248758ecda57a4 (patch) | |
tree | dc667acef485c06485bc53a5b4bde3f4595d53b5 | |
parent | 7721b923d53fb9eb93f80bb93b4c3bd976c05b4c (diff) | |
download | haskell-459afeb592d5ff6d338184f5ef248758ecda57a4.tar.gz |
Fix build systems
-rw-r--r-- | compiler/ghc.cabal.in | 5 | ||||
-rw-r--r-- | compiler/ghc.mk | 11 | ||||
-rw-r--r-- | ghc.mk | 2 | ||||
-rw-r--r-- | hadrian/src/Rules/Generate.hs | 10 | ||||
-rw-r--r-- | hadrian/src/Settings/Builders/DeriveConstants.hs | 3 | ||||
-rw-r--r-- | includes/ghc.mk | 10 | ||||
-rw-r--r-- | libraries/ghc-boot/ghc-boot.cabal.in | 2 | ||||
-rw-r--r-- | libraries/ghc-boot/ghc.mk | 2 |
8 files changed, 15 insertions, 30 deletions
diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index efa45c89e4..e37a32ce6a 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -257,6 +257,7 @@ Library GHC.Cmm.Ppr.Expr GHC.Data.Bitmap GHC.Platform + GHC.Platform.Constants GHC.Platform.Ways GHC.Platform.Profile GHC.Platform.Regs @@ -568,8 +569,8 @@ Library GHC.Cmm.Dataflow.Label reexported-modules: - GHC.Platform.ArchOS - GHC.Platform.Host + GHC.Platform.ArchOS + , GHC.Platform.Host Exposed-Modules: GHC.CmmToAsm diff --git a/compiler/ghc.mk b/compiler/ghc.mk index 92a844c779..bd5fdde71f 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -47,9 +47,7 @@ $(foreach n,1 2 3, \ $(foreach n,1 2 3, \ $(eval compiler/stage$n/package-data.mk : compiler/stage$n/build/GHC/Settings/Config.hs) \ - $(eval compiler/stage$n/build/PlatformConstants.o : $(includes_GHCCONSTANTS_HASKELL_TYPE)) \ - $(eval compiler/stage$n/build/GHC/Driver/Session.o: $(includes_GHCCONSTANTS_HASKELL_EXPORTS)) \ - $(eval compiler/stage$n/build/GHC/Driver/Session.o: $(includes_GHCCONSTANTS_HASKELL_WRAPPERS)) \ + $(eval compiler/stage$n/build/GHC/Platform/Constants.o: compiler/stage$n/build/GHC/Platform/Constants.hs) \ ) endif @@ -95,6 +93,10 @@ compiler/stage$1/build/GHC/Settings/Config.hs : mk/config.mk mk/project.mk | $$$ @echo 'cStage :: String' >> $$@ @echo 'cStage = show ($1 :: Int)' >> $$@ @echo done. + +compiler/stage$1/build/GHC/Platform/Constants.hs : $$(includes_GHCCONSTANTS_HASKELL_TYPE) | $$$$(dir $$$$@)/. + $$(call removeFiles,$$@) + "$$(CP)" $$< $$@ endef $(eval $(call compilerConfig,0)) @@ -351,9 +353,6 @@ $(compiler_stage2_depfile_haskell) : $(includes_1_H_CONFIG) $(includes_1_H_PLATF $(compiler_stage3_depfile_haskell) : $(includes_2_H_CONFIG) $(includes_2_H_PLATFORM) COMPILER_INCLUDES_DEPS += $(includes_GHCCONSTANTS) -COMPILER_INCLUDES_DEPS += $(includes_GHCCONSTANTS_HASKELL_TYPE) -COMPILER_INCLUDES_DEPS += $(includes_GHCCONSTANTS_HASKELL_WRAPPERS) -COMPILER_INCLUDES_DEPS += $(includes_GHCCONSTANTS_HASKELL_EXPORTS) COMPILER_INCLUDES_DEPS += $(includes_DERIVEDCONSTANTS) $(compiler_stage1_depfile_haskell) : $(COMPILER_INCLUDES_DEPS) $(PRIMOP_BITS_STAGE1) @@ -1543,7 +1543,7 @@ phase_0_builds: $(utils/hsc2hs_dist_depfile_c_asm) phase_0_builds: $(utils/genprimopcode_dist_depfile_haskell) phase_0_builds: $(utils/genprimopcode_dist_depfile_c_asm) # deriveConstants is used to create header files included in the -# ghc package. +# ghc-boot package. phase_0_builds: $(utils/deriveConstants_dist_depfile_haskell) phase_0_builds: $(utils/deriveConstants_dist_depfile_c_asm) diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs index 7a51814b07..850bb87de4 100644 --- a/hadrian/src/Rules/Generate.hs +++ b/hadrian/src/Rules/Generate.hs @@ -43,9 +43,7 @@ ghcPrimDependencies = do derivedConstantsFiles :: [FilePath] derivedConstantsFiles = [ "DerivedConstants.h" - , "GHCConstantsHaskellExports.hs" - , "GHCConstantsHaskellType.hs" - , "GHCConstantsHaskellWrappers.hs" ] + ] compilerDependencies :: Expr [FilePath] compilerDependencies = do @@ -71,7 +69,9 @@ compilerDependencies = do , "primop-vector-tys-exports.hs-incl" , "primop-vector-tys.hs-incl" , "primop-vector-uniques.hs-incl" - , "primop-docs.hs-incl" ] ] + , "primop-docs.hs-incl" + , "GHC/Platform/Constants.hs" + ] ] generatedDependencies :: Expr [FilePath] generatedDependencies = do @@ -111,6 +111,7 @@ generatePackageCode context@(Context stage pkg _) = do priority 2.0 $ do when (pkg == compiler) $ do + root -/- "**" -/- dir -/- "GHC/Platform/Constants.hs" %> genPlatformConstantsType context root -/- "**" -/- dir -/- "GHC/Settings/Config.hs" %> go generateConfigHs root -/- "**" -/- dir -/- "*.hs-incl" %> genPrimopCode context when (pkg == ghcPrim) $ do @@ -119,7 +120,6 @@ generatePackageCode context@(Context stage pkg _) = do when (pkg == ghcBoot) $ do root -/- "**" -/- dir -/- "GHC/Version.hs" %> go generateVersionHs root -/- "**" -/- dir -/- "GHC/Platform/Host.hs" %> go generatePlatformHostHs - root -/- "**" -/- dir -/- "GHC/Platform/Constants.hs" %> genPlatformConstantsType context when (pkg == compiler) $ do root -/- primopsTxt stage %> \file -> do diff --git a/hadrian/src/Settings/Builders/DeriveConstants.hs b/hadrian/src/Settings/Builders/DeriveConstants.hs index de548b41ff..be115fb789 100644 --- a/hadrian/src/Settings/Builders/DeriveConstants.hs +++ b/hadrian/src/Settings/Builders/DeriveConstants.hs @@ -8,10 +8,7 @@ import Settings.Builders.Common deriveConstantsPairs :: [(String, String)] deriveConstantsPairs = [ ("DerivedConstants.h", "--gen-header") - , ("GHCConstantsHaskellType.hs", "--gen-haskell-type") , ("platformConstants", "--gen-haskell-value") - , ("GHCConstantsHaskellWrappers.hs", "--gen-haskell-wrappers") - , ("GHCConstantsHaskellExports.hs", "--gen-haskell-exports") ] -- TODO: do we need to support `includes_CC_OPTS += -DDYNAMIC_BY_DEFAULT`? diff --git a/includes/ghc.mk b/includes/ghc.mk index efae7e3a22..f89d0ca482 100644 --- a/includes/ghc.mk +++ b/includes/ghc.mk @@ -271,8 +271,6 @@ $(includes_SETTINGS) : includes/Makefile | $$(dir $$@)/. includes_DERIVEDCONSTANTS = includes/dist-derivedconstants/header/DerivedConstants.h includes_GHCCONSTANTS_HASKELL_TYPE = includes/dist-derivedconstants/header/GHCConstantsHaskellType.hs includes_GHCCONSTANTS_HASKELL_VALUE = includes/dist-derivedconstants/header/platformConstants -includes_GHCCONSTANTS_HASKELL_WRAPPERS = includes/dist-derivedconstants/header/GHCConstantsHaskellWrappers.hs -includes_GHCCONSTANTS_HASKELL_EXPORTS = includes/dist-derivedconstants/header/GHCConstantsHaskellExports.hs INSTALL_LIBS += $(includes_GHCCONSTANTS_HASKELL_VALUE) @@ -296,12 +294,6 @@ $(includes_GHCCONSTANTS_HASKELL_TYPE): $(deriveConstants_INPLACE) | $$(dir $$@)/ $(includes_GHCCONSTANTS_HASKELL_VALUE): $(deriveConstants_INPLACE) | $$(dir $$@)/. $< --gen-haskell-value -o $@ --tmpdir $(dir $@) $(DERIVE_CONSTANTS_FLAGS) - -$(includes_GHCCONSTANTS_HASKELL_WRAPPERS): $(deriveConstants_INPLACE) | $$(dir $$@)/. - $< --gen-haskell-wrappers -o $@ --tmpdir $(dir $@) $(DERIVE_CONSTANTS_FLAGS) - -$(includes_GHCCONSTANTS_HASKELL_EXPORTS): $(deriveConstants_INPLACE) | $$(dir $$@)/. - $< --gen-haskell-exports -o $@ --tmpdir $(dir $@) $(DERIVE_CONSTANTS_FLAGS) endif # --------------------------------------------------------------------------- @@ -316,8 +308,6 @@ $(eval $(call all-target,includes,\ $(includes_1_H_CONFIG) $(includes_1_H_PLATFORM) $(includes_1_H_VERSION) \ $(includes_GHCCONSTANTS_HASKELL_TYPE) \ $(includes_GHCCONSTANTS_HASKELL_VALUE) \ - $(includes_GHCCONSTANTS_HASKELL_WRAPPERS) \ - $(includes_GHCCONSTANTS_HASKELL_EXPORTS) \ $(includes_DERIVEDCONSTANTS))) install: install_includes diff --git a/libraries/ghc-boot/ghc-boot.cabal.in b/libraries/ghc-boot/ghc-boot.cabal.in index e320a5725f..ddefca51db 100644 --- a/libraries/ghc-boot/ghc-boot.cabal.in +++ b/libraries/ghc-boot/ghc-boot.cabal.in @@ -45,7 +45,6 @@ Library GHC.HandleEncoding GHC.Platform.ArchOS GHC.Platform.Host - GHC.Platform.Constants GHC.Settings.Utils GHC.UniqueSubdir GHC.Version @@ -54,7 +53,6 @@ Library -- autogen-modules: -- GHC.Version -- GHC.Platform.Host - -- GHC.Platform.Constants build-depends: base >= 4.7 && < 4.16, binary == 0.8.*, diff --git a/libraries/ghc-boot/ghc.mk b/libraries/ghc-boot/ghc.mk index d183ccc501..daa3e3fc55 100644 --- a/libraries/ghc-boot/ghc.mk +++ b/libraries/ghc-boot/ghc.mk @@ -40,7 +40,7 @@ libraries/ghc-boot/dist-install/build/GHC/Platform/Host.hs: mk/project.mk | $$(d $(call removeFiles,$@) @echo "module GHC.Platform.Host where" >> $@ @echo >> $@ - @echo 'import GHC.Platform' >> $@ + @echo 'import GHC.Platform.ArchOS' >> $@ @echo >> $@ @echo 'hostPlatformArch :: Arch' >> $@ @echo 'hostPlatformArch = $(HaskellHostArch)' >> $@ |