Commit 27941064 authored by John Ericson's avatar John Ericson Committed by Marge Bot

Remove cGhcEnableTablesNextToCode

Get "Tables next to code" from the settings file instead.
parent ead3f835
Pipeline #5499 failed with stages
in 920 minutes and 45 seconds
......@@ -106,8 +106,6 @@ ifeq "$(GhcRtsWithLibdw)" "YES"
else
@echo 'cGhcRtsWithLibdw = False' >> $@
endif
@echo 'cGhcEnableTablesNextToCode :: String' >> $@
@echo 'cGhcEnableTablesNextToCode = "$(GhcEnableTablesNextToCode)"' >> $@
@echo 'cLeadingUnderscore :: String' >> $@
@echo 'cLeadingUnderscore = "$(LeadingUnderscore)"' >> $@
@echo 'cLibFFI :: Bool' >> $@
......
......@@ -1353,7 +1353,10 @@ data Settings = Settings {
sOpt_lcc :: [String], -- LLVM: c compiler
sOpt_i :: [String], -- iserv options
sPlatformConstants :: PlatformConstants
sPlatformConstants :: PlatformConstants,
-- Formerly Config.hs, target specific
sTablesNextToCode :: Bool
}
targetPlatform :: DynFlags -> Platform
......@@ -1621,17 +1624,14 @@ defaultObjectTarget platform
| cGhcWithNativeCodeGen == "YES" = HscAsm
| otherwise = HscLlvm
tablesNextToCode :: DynFlags -> Bool
tablesNextToCode dflags
= mkTablesNextToCode (platformUnregisterised (targetPlatform dflags))
-- Determines whether we will be compiling
-- info tables that reside just before the entry code, or with an
-- indirection to the entry code. See TABLES_NEXT_TO_CODE in
-- includes/rts/storage/InfoTables.h.
mkTablesNextToCode :: Bool -> Bool
mkTablesNextToCode unregisterised
= not unregisterised && cGhcEnableTablesNextToCode == "YES"
tablesNextToCode :: DynFlags -> Bool
tablesNextToCode dflags =
not (platformUnregisterised $ targetPlatform dflags) &&
sTablesNextToCode (settings dflags)
data DynLibLoader
= Deployable
......@@ -5621,7 +5621,7 @@ compilerInfo dflags
("Object splitting supported", showBool False),
("Have native code generator", cGhcWithNativeCodeGen),
("Support SMP", cGhcWithSMP),
("Tables next to code", cGhcEnableTablesNextToCode),
("Tables next to code", showBool $ sTablesNextToCode $ settings dflags),
("RTS ways", cGhcRTSWays),
("RTS expects libdw", showBool cGhcRtsWithLibdw),
-- Whether or not we support @-dynamic-too@
......
......@@ -184,6 +184,7 @@ initSysTools top_dir
targetHasGnuNonexecStack <- readSetting "target has GNU nonexec stack"
targetHasIdentDirective <- readSetting "target has .ident directive"
targetHasSubsectionsViaSymbols <- readSetting "target has subsections via symbols"
tablesNextToCode <- getBooleanSetting "Tables next to code"
myExtraGccViaCFlags <- getSetting "GCC extra via C opts"
-- On Windows, mingw is distributed with GHC,
-- so we look in TopDir/../mingw/bin,
......@@ -303,7 +304,8 @@ initSysTools top_dir
sOpt_lo = [],
sOpt_lc = [],
sOpt_i = [],
sPlatformConstants = platformConstants
sPlatformConstants = platformConstants,
sTablesNextToCode = tablesNextToCode
}
......
......@@ -303,6 +303,8 @@ generateSettings = do
, ("LLVM llc command", settingsFileSetting SettingsFileSetting_LlcCommand)
, ("LLVM opt command", settingsFileSetting SettingsFileSetting_OptCommand)
, ("LLVM clang command", settingsFileSetting SettingsFileSetting_ClangCommand)
, ("Tables next to code", yesNo <$> ghcEnableTablesNextToCode)
]
let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")"
pure $ case settings of
......@@ -334,7 +336,6 @@ generateConfigHs = do
cGhcWithInterpreter <- expr $ yesNo <$> ghcWithInterpreter
cGhcWithNativeCodeGen <- expr $ yesNo <$> ghcWithNativeCodeGen
cGhcWithSMP <- expr $ yesNo <$> ghcWithSMP
cGhcEnableTablesNextToCode <- expr $ yesNo <$> ghcEnableTablesNextToCode
cLeadingUnderscore <- expr $ yesNo <$> flag LeadingUnderscore
cLibFFI <- expr useLibFFIForAdjustors
rtsWays <- getRtsWays
......@@ -389,8 +390,6 @@ generateConfigHs = do
, "cGhcWithSMP = " ++ show cGhcWithSMP
, "cGhcRTSWays :: String"
, "cGhcRTSWays = " ++ show cGhcRTSWays
, "cGhcEnableTablesNextToCode :: String"
, "cGhcEnableTablesNextToCode = " ++ show cGhcEnableTablesNextToCode
, "cLeadingUnderscore :: String"
, "cLeadingUnderscore = " ++ show cLeadingUnderscore
, "cLibFFI :: Bool"
......
......@@ -210,6 +210,7 @@ $(includes_SETTINGS) : includes/Makefile | $$(dir $$@)/.
@echo ',("LLVM llc command", "$(SettingsLlcCommand)")' >> $@
@echo ',("LLVM opt command", "$(SettingsOptCommand)")' >> $@
@echo ',("LLVM clang command", "$(SettingsClangCommand)")' >> $@
@echo ',("Tables next to code", "$(GhcEnableTablesNextToCode)")' >> $@
@echo ']' >> $@
......
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