diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-07-21 19:15:59 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-07-25 00:45:08 -0400 |
commit | 7721b923d53fb9eb93f80bb93b4c3bd976c05b4c (patch) | |
tree | edc61b1ed9885e442c7327460052f10d1ca589fa /hadrian/src | |
parent | 73145d57f961c73b5853da7881d6a21e48e05909 (diff) | |
download | haskell-7721b923d53fb9eb93f80bb93b4c3bd976c05b4c.tar.gz |
Move GHC.Platform into the compiler
Previously it was in ghc-boot so that ghc-pkg could use it. However it
wasn't necessary because ghc-pkg only uses a subset of it: reading
target arch and OS from the settings file. This is now done via
GHC.Platform.ArchOS (was called PlatformMini before).
Diffstat (limited to 'hadrian/src')
-rw-r--r-- | hadrian/src/Rules/Generate.hs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs index 98ea2bd353..7a51814b07 100644 --- a/hadrian/src/Rules/Generate.hs +++ b/hadrian/src/Rules/Generate.hs @@ -474,17 +474,14 @@ generatePlatformHostHs = do return $ unlines [ "module GHC.Platform.Host where" , "" - , "import GHC.Platform" + , "import GHC.Platform.ArchOS" , "" - , "cHostPlatformArch :: Arch" - , "cHostPlatformArch = " ++ cHostPlatformArch + , "hostPlatformArch :: Arch" + , "hostPlatformArch = " ++ cHostPlatformArch , "" - , "cHostPlatformOS :: OS" - , "cHostPlatformOS = " ++ cHostPlatformOS + , "hostPlatformOS :: OS" + , "hostPlatformOS = " ++ cHostPlatformOS , "" - , "cHostPlatformMini :: PlatformMini" - , "cHostPlatformMini = PlatformMini" - , " { platformMini_arch = cHostPlatformArch" - , " , platformMini_os = cHostPlatformOS" - , " }" + , "hostPlatformArchOS :: ArchOS" + , "hostPlatformArchOS = ArchOS hostPlatformArch hostPlatformOS" ] |