summaryrefslogtreecommitdiff
path: root/hadrian/src/Oracles/Setting.hs
diff options
context:
space:
mode:
Diffstat (limited to 'hadrian/src/Oracles/Setting.hs')
-rw-r--r--hadrian/src/Oracles/Setting.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/hadrian/src/Oracles/Setting.hs b/hadrian/src/Oracles/Setting.hs
index 8634e70b55..3713b2457a 100644
--- a/hadrian/src/Oracles/Setting.hs
+++ b/hadrian/src/Oracles/Setting.hs
@@ -7,7 +7,7 @@ module Oracles.Setting (
-- * Helpers
ghcCanonVersion, cmdLineLengthLimit, hostSupportsRPaths, topDirectory,
- libsuf, ghcVersionStage,
+ libsuf, ghcVersionStage, bashPath,
-- ** Target platform things
anyTargetPlatform, anyTargetOs, anyTargetArch, anyHostOs,
@@ -76,6 +76,7 @@ data Setting = BuildArch
| TargetArchHaskell
| TargetOsHaskell
| TargetArmVersion
+ | BourneShell
-- TODO: Reduce the variety of similar flags (e.g. CPP and non-CPP versions).
-- | Each 'SettingList' comes from the file @hadrian/cfg/system.config@,
@@ -172,6 +173,7 @@ setting key = lookupValueOrError configFile $ case key of
TargetVendor -> "target-vendor"
TargetArchHaskell -> "target-arch-haskell"
TargetOsHaskell -> "target-os-haskell"
+ BourneShell -> "bourne-shell"
-- | Look up the value of a 'SettingList' in @cfg/system.config@, tracking the
-- result.
@@ -217,6 +219,10 @@ settingsFileSetting key = lookupValueOrError configFile $ case key of
getSetting :: Setting -> Expr c b String
getSetting = expr . setting
+-- | The path to a Bourne shell interpreter.
+bashPath :: Action FilePath
+bashPath = setting BourneShell
+
-- | An expression that looks up the value of a 'SettingList' in
-- @cfg/system.config@, tracking the result.
getSettingList :: SettingList -> Args c b