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 /ghc/Main.hs | |
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 'ghc/Main.hs')
-rw-r--r-- | ghc/Main.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs index 41435af878..fa6608761d 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -792,16 +792,16 @@ showSupportedExtensions m_top_dir = do Nothing -> throwE $ SettingsError_MissingData "Could not find the top directory, missing -B flag" Just dir -> pure dir initSettings top_dir - targetPlatformMini <- case res of - Right s -> pure $ platformMini $ sTargetPlatform s + arch_os <- case res of + Right s -> pure $ platformArchOS $ sTargetPlatform s Left (SettingsError_MissingData msg) -> do hPutStrLn stderr $ "WARNING: " ++ show msg hPutStrLn stderr $ "cannot know target platform so guessing target == host (native compiler)." - pure cHostPlatformMini + pure hostPlatformArchOS Left (SettingsError_BadData msg) -> do hPutStrLn stderr msg exitWith $ ExitFailure 1 - mapM_ putStrLn $ supportedLanguagesAndExtensions targetPlatformMini + mapM_ putStrLn $ supportedLanguagesAndExtensions arch_os showVersion :: IO () showVersion = putStrLn (cProjectName ++ ", version " ++ cProjectVersion) |