Skip to content
Snippets Groups Projects
Commit 01f8e390 authored by Alp Mestanogullari's avatar Alp Mestanogullari :squid: Committed by Marge Bot
Browse files

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.
parent 4b228768
No related merge requests found
......@@ -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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment