summaryrefslogtreecommitdiff
path: root/hadrian/src/Oracles/Setting.hs
diff options
context:
space:
mode:
authorAndrey Mokhov <andrey.mokhov@gmail.com>2019-06-23 00:50:43 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-06-25 01:36:10 -0400
commit15b262237ab055f4afbf79588f76631a194a332f (patch)
treebb04ea8eb6e5a4fffdecc2010d7b4782589cfb7b /hadrian/src/Oracles/Setting.hs
parent581cbc28e143a4ed8e7f794ed1618161222a5646 (diff)
downloadhaskell-15b262237ab055f4afbf79588f76631a194a332f.tar.gz
Fix cyclic dependencies when using --configure
This resolves #16809 (https://gitlab.haskell.org/ghc/ghc/issues/16809). This patch removes the unnecessary dependency on configure-generated flags `windowsHost`, `osxHost` and `iosHost`, using the information provided by the module `System.Info` instead. We also take care to use the `CrossCompiling` flag generated by the configure script only after the latter had a chance to run.
Diffstat (limited to 'hadrian/src/Oracles/Setting.hs')
-rw-r--r--hadrian/src/Oracles/Setting.hs18
1 files changed, 2 insertions, 16 deletions
diff --git a/hadrian/src/Oracles/Setting.hs b/hadrian/src/Oracles/Setting.hs
index 89f5d70c9f..408f9e3422 100644
--- a/hadrian/src/Oracles/Setting.hs
+++ b/hadrian/src/Oracles/Setting.hs
@@ -2,10 +2,8 @@ module Oracles.Setting (
configFile, Setting (..), SettingList (..), setting, settingList, getSetting,
getSettingList, anyTargetPlatform, anyTargetOs, anyTargetArch, anyHostOs,
ghcWithInterpreter, ghcEnableTablesNextToCode, useLibFFIForAdjustors,
- ghcCanonVersion, cmdLineLengthLimit, iosHost, osxHost, windowsHost,
- hostSupportsRPaths, topDirectory, libsuf, ghcVersionStage,
- SettingsFileSetting (..),
- settingsFileSetting
+ ghcCanonVersion, cmdLineLengthLimit, hostSupportsRPaths, topDirectory,
+ libsuf, ghcVersionStage, SettingsFileSetting (..), settingsFileSetting
) where
import Hadrian.Expression
@@ -209,14 +207,6 @@ anyTargetArch = matchSetting TargetArch
anyHostOs :: [String] -> Action Bool
anyHostOs = matchSetting HostOs
--- | Check whether the host OS setting is set to @"ios"@.
-iosHost :: Action Bool
-iosHost = anyHostOs ["ios"]
-
--- | Check whether the host OS setting is set to @"darwin"@.
-osxHost :: Action Bool
-osxHost = anyHostOs ["darwin"]
-
-- | Check whether the host OS supports the @-rpath@ linker option when
-- using dynamic linking.
--
@@ -225,10 +215,6 @@ osxHost = anyHostOs ["darwin"]
hostSupportsRPaths :: Action Bool
hostSupportsRPaths = anyHostOs ["linux", "darwin", "freebsd"]
--- | Check whether the host OS setting is set to @"mingw32"@ or @"cygwin32"@.
-windowsHost :: Action Bool
-windowsHost = anyHostOs ["mingw32", "cygwin32"]
-
-- | Check whether the target supports GHCi.
ghcWithInterpreter :: Action Bool
ghcWithInterpreter = do