From 7721b923d53fb9eb93f80bb93b4c3bd976c05b4c Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Tue, 21 Jul 2020 19:15:59 +0200 Subject: 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). --- hadrian/src/Rules/Generate.hs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'hadrian/src') 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" ] -- cgit v1.2.1