diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-06-29 19:58:56 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-07-22 20:19:59 -0400 |
commit | 735f9d6bac316a0c1c68a8b49bba465f07b01cdd (patch) | |
tree | a4b5eeb8963ff7e51c8b16bfe2ba4e15bf054262 /hadrian | |
parent | e079bb721e25dbc19e1adf8c8051b6ea03752962 (diff) | |
download | haskell-735f9d6bac316a0c1c68a8b49bba465f07b01cdd.tar.gz |
Replace ghcWithNativeCodeGen with a proper Backend datatype
* Represent backends with a `Backend` datatype in GHC.Driver.Backend
* Don't detect the default backend to use for the target platform at
compile time in Hadrian/make but at runtime. It makes "Settings"
simpler and it is a step toward making GHC multi-target.
* The latter change also fixes hadrian which has not been updated to
take into account that the NCG now supports AIX and PPC64 (cf
df26b95559fd467abc0a3a4151127c95cb5011b9 and
d3c1dda60d0ec07fc7f593bfd83ec9457dfa7984)
* Also we don't treat iOS specifically anymore (cf
cb4878ffd18a3c70f98bdbb413cd3c4d1f054e1f)
Diffstat (limited to 'hadrian')
-rw-r--r-- | hadrian/src/Oracles/Flag.hs | 9 | ||||
-rw-r--r-- | hadrian/src/Rules/Generate.hs | 1 |
2 files changed, 1 insertions, 9 deletions
diff --git a/hadrian/src/Oracles/Flag.hs b/hadrian/src/Oracles/Flag.hs index 2de81cfdd6..4f88af6432 100644 --- a/hadrian/src/Oracles/Flag.hs +++ b/hadrian/src/Oracles/Flag.hs @@ -2,7 +2,7 @@ module Oracles.Flag ( Flag (..), flag, getFlag, platformSupportsSharedLibs, - ghcWithNativeCodeGen, targetSupportsSMP + targetSupportsSMP ) where import Hadrian.Oracles.TextFile @@ -77,10 +77,3 @@ targetSupportsSMP = do , ver < ARMv7 -> return False | goodArch -> return True | otherwise -> return False - -ghcWithNativeCodeGen :: Action Bool -ghcWithNativeCodeGen = do - goodArch <- anyTargetArch ["i386", "x86_64", "sparc", "powerpc"] - badOs <- anyTargetOs ["ios", "aix"] - ghcUnreg <- flag GhcUnregisterised - return $ goodArch && not badOs && not ghcUnreg diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs index 62a7bbebbc..e2097d8d79 100644 --- a/hadrian/src/Rules/Generate.hs +++ b/hadrian/src/Rules/Generate.hs @@ -315,7 +315,6 @@ generateSettings = do , ("BigNum backend", getBignumBackend) , ("Use interpreter", expr $ yesNo <$> ghcWithInterpreter) - , ("Use native code generator", expr $ yesNo <$> ghcWithNativeCodeGen) , ("Support SMP", expr $ yesNo <$> targetSupportsSMP) , ("RTS ways", unwords . map show <$> getRtsWays) , ("Tables next to code", expr $ yesNo <$> flag TablesNextToCode) |