Commit 2988ef5e authored by John Ericson's avatar John Ericson Committed by Marge Bot
Browse files

Move cGHC_UNLIT_PGM to be "unlit command" in settings

The bulk of the work was done in #712, making settings be make/Hadrian
controlled. This commit then just moves the unlit command rules in
make/Hadrian from the `Config.hs` generator to the `settings` generator
in each build system.

I think this is a good change because the crucial benefit is *settings*
don't affect the build: ghc gets one baby step closer to being a regular
cabal executable, and make/Hadrian just maintains settings as part of
bootstrapping.
parent 53d1cd96
Pipeline #5368 failed with stages
in 345 minutes and 28 seconds
...@@ -110,8 +110,6 @@ endif ...@@ -110,8 +110,6 @@ endif
@echo 'cGhcEnableTablesNextToCode = "$(GhcEnableTablesNextToCode)"' >> $@ @echo 'cGhcEnableTablesNextToCode = "$(GhcEnableTablesNextToCode)"' >> $@
@echo 'cLeadingUnderscore :: String' >> $@ @echo 'cLeadingUnderscore :: String' >> $@
@echo 'cLeadingUnderscore = "$(LeadingUnderscore)"' >> $@ @echo 'cLeadingUnderscore = "$(LeadingUnderscore)"' >> $@
@echo 'cGHC_UNLIT_PGM :: String' >> $@
@echo 'cGHC_UNLIT_PGM = "$(utils/unlit_dist_PROG)"' >> $@
@echo 'cLibFFI :: Bool' >> $@ @echo 'cLibFFI :: Bool' >> $@
ifeq "$(UseLibFFIForAdjustors)" "YES" ifeq "$(UseLibFFIForAdjustors)" "YES"
@echo 'cLibFFI = True' >> $@ @echo 'cLibFFI = True' >> $@
......
...@@ -211,9 +211,9 @@ initSysTools top_dir ...@@ -211,9 +211,9 @@ initSysTools top_dir
ghc_usage_msg_path = installed "ghc-usage.txt" ghc_usage_msg_path = installed "ghc-usage.txt"
ghci_usage_msg_path = installed "ghci-usage.txt" ghci_usage_msg_path = installed "ghci-usage.txt"
-- For all systems, unlit, split, mangle are GHC utilities -- For all systems, unlit, split, mangle are GHC utilities
-- architecture-specific stuff is done when building Config.hs -- architecture-specific stuff is done when building Config.hs
unlit_path = libexec cGHC_UNLIT_PGM unlit_path <- getToolSetting "unlit command"
windres_path <- getToolSetting "windres command" windres_path <- getToolSetting "windres command"
libtool_path <- getToolSetting "libtool command" libtool_path <- getToolSetting "libtool command"
......
...@@ -290,6 +290,7 @@ generateSettings = do ...@@ -290,6 +290,7 @@ generateSettings = do
, ("dllwrap command", settingsFileSetting SettingsFileSetting_DllWrapCommand) , ("dllwrap command", settingsFileSetting SettingsFileSetting_DllWrapCommand)
, ("windres command", settingsFileSetting SettingsFileSetting_WindresCommand) , ("windres command", settingsFileSetting SettingsFileSetting_WindresCommand)
, ("libtool command", settingsFileSetting SettingsFileSetting_LibtoolCommand) , ("libtool command", settingsFileSetting SettingsFileSetting_LibtoolCommand)
, ("unlit command", ("$topdir/bin/" <>) . takeFileName <$> builderPath Unlit)
, ("cross compiling", flag' CrossCompiling) , ("cross compiling", flag' CrossCompiling)
, ("target os", lookupValueOrError configFile "haskell-target-os") , ("target os", lookupValueOrError configFile "haskell-target-os")
, ("target arch", lookupValueOrError configFile "haskell-target-arch") , ("target arch", lookupValueOrError configFile "haskell-target-arch")
...@@ -335,7 +336,6 @@ generateConfigHs = do ...@@ -335,7 +336,6 @@ generateConfigHs = do
cGhcWithSMP <- expr $ yesNo <$> ghcWithSMP cGhcWithSMP <- expr $ yesNo <$> ghcWithSMP
cGhcEnableTablesNextToCode <- expr $ yesNo <$> ghcEnableTablesNextToCode cGhcEnableTablesNextToCode <- expr $ yesNo <$> ghcEnableTablesNextToCode
cLeadingUnderscore <- expr $ yesNo <$> flag LeadingUnderscore cLeadingUnderscore <- expr $ yesNo <$> flag LeadingUnderscore
cGHC_UNLIT_PGM <- fmap takeFileName $ getBuilderPath Unlit
cLibFFI <- expr useLibFFIForAdjustors cLibFFI <- expr useLibFFIForAdjustors
rtsWays <- getRtsWays rtsWays <- getRtsWays
cGhcRtsWithLibdw <- getFlag WithLibdw cGhcRtsWithLibdw <- getFlag WithLibdw
...@@ -393,8 +393,6 @@ generateConfigHs = do ...@@ -393,8 +393,6 @@ generateConfigHs = do
, "cGhcEnableTablesNextToCode = " ++ show cGhcEnableTablesNextToCode , "cGhcEnableTablesNextToCode = " ++ show cGhcEnableTablesNextToCode
, "cLeadingUnderscore :: String" , "cLeadingUnderscore :: String"
, "cLeadingUnderscore = " ++ show cLeadingUnderscore , "cLeadingUnderscore = " ++ show cLeadingUnderscore
, "cGHC_UNLIT_PGM :: String"
, "cGHC_UNLIT_PGM = " ++ show cGHC_UNLIT_PGM
, "cLibFFI :: Bool" , "cLibFFI :: Bool"
, "cLibFFI = " ++ show cLibFFI , "cLibFFI = " ++ show cLibFFI
, "cGhcThreaded :: Bool" , "cGhcThreaded :: Bool"
......
...@@ -197,6 +197,7 @@ $(includes_SETTINGS) : includes/Makefile | $$(dir $$@)/. ...@@ -197,6 +197,7 @@ $(includes_SETTINGS) : includes/Makefile | $$(dir $$@)/.
@echo ',("dllwrap command", "$(SettingsDllWrapCommand)")' >> $@ @echo ',("dllwrap command", "$(SettingsDllWrapCommand)")' >> $@
@echo ',("windres command", "$(SettingsWindresCommand)")' >> $@ @echo ',("windres command", "$(SettingsWindresCommand)")' >> $@
@echo ',("libtool command", "$(SettingsLibtoolCommand)")' >> $@ @echo ',("libtool command", "$(SettingsLibtoolCommand)")' >> $@
@echo ',("unlit command", "$$topdir/bin/$(utils/unlit_dist_PROG)")' >> $@
@echo ',("cross compiling", "$(CrossCompiling)")' >> $@ @echo ',("cross compiling", "$(CrossCompiling)")' >> $@
@echo ',("target os", "$(HaskellTargetOs)")' >> $@ @echo ',("target os", "$(HaskellTargetOs)")' >> $@
@echo ',("target arch", "$(HaskellTargetArch)")' >> $@ @echo ',("target arch", "$(HaskellTargetArch)")' >> $@
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment