summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlp Mestanogullari <alpmestan@gmail.com>2019-05-15 15:26:45 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-05-27 10:06:26 -0400
commit01f8e39032f9fd86a23e5bbb7dbf1aca3a3d114d (patch)
tree44ccae6457843cdf002818fa4104146f8113553e
parent4b2287681e1610ad9fdc665c50f4f1476d856060 (diff)
downloadhaskell-01f8e39032f9fd86a23e5bbb7dbf1aca3a3d114d.tar.gz
Hadrian: Fix problem with unlit path in settings file
e529c65e introduced a problem in the logic for generating the path to the unlit command in the settings file, and this patches fixes it. This fixes many tests, the simplest of which is: > _build/stage1/bin/ghc testsuite/tests/parser/should_fail/T8430.lhs which failed because of a wrong path for unlit, and now fails for the right reason, with the error message expected for this test. This addresses #16659.
-rw-r--r--hadrian/src/Rules/Generate.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs
index d69dd38016..c8f8cf15ca 100644
--- a/hadrian/src/Rules/Generate.hs
+++ b/hadrian/src/Rules/Generate.hs
@@ -5,6 +5,7 @@ module Rules.Generate (
) where
import Base
+import qualified Context
import Expression
import Flavour
import Hadrian.Oracles.TextFile (lookupValueOrError)
@@ -271,6 +272,7 @@ generateGhcPlatformH = do
generateSettings :: Expr String
generateSettings = do
+ ctx <- getContext
settings <- traverse sequence $
[ ("GCC extra via C opts", expr $ lookupValueOrError configFile "gcc-extra-via-c-opts")
, ("C compiler command", expr $ settingsFileSetting SettingsFileSetting_CCompilerCommand)
@@ -293,7 +295,7 @@ generateSettings = do
, ("dllwrap command", expr $ settingsFileSetting SettingsFileSetting_DllWrapCommand)
, ("windres command", expr $ settingsFileSetting SettingsFileSetting_WindresCommand)
, ("libtool command", expr $ settingsFileSetting SettingsFileSetting_LibtoolCommand)
- , ("unlit command", ("$topdir/bin/" <>) <$> getBuilderPath Unlit)
+ , ("unlit command", ("$topdir/bin/" <>) <$> expr (programName (ctx { Context.package = unlit })))
, ("cross compiling", expr $ yesNo <$> flag CrossCompiling)
, ("target platform string", getSetting TargetPlatform)
, ("target os", expr $ lookupValueOrError configFile "haskell-target-os")