diff options
author | Cheng Shao <terrorjack@type.dance> | 2023-04-10 01:07:33 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-04-24 16:21:30 -0400 |
commit | 1338b7a3354ed77f6add43c1d33b776db53e7036 (patch) | |
tree | 4584c74f30e2c113a83b47b91132a3a8d0c0cfaa | |
parent | 2685a12d462573ce23ef7f4356a2f8c95ef63e1d (diff) | |
download | haskell-1338b7a3354ed77f6add43c1d33b776db53e7036.tar.gz |
hadrian: fix non-ghc program paths passed to testsuite driver when testing cross GHC
-rw-r--r-- | hadrian/src/Settings/Builders/RunTest.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs index 1a0f411d97..5e4a1ad17b 100644 --- a/hadrian/src/Settings/Builders/RunTest.hs +++ b/hadrian/src/Settings/Builders/RunTest.hs @@ -315,6 +315,7 @@ getTestArgs = do bindir <- expr $ getBinaryDirectory (testCompiler args) compiler <- expr $ getCompilerPath (testCompiler args) globalVerbosity <- shakeVerbosity <$> expr getShakeOptions + cross_prefix <- expr crossPrefix -- the testsuite driver will itself tell us if we need to generate the docs target -- So we always pass the haddock path if the hadrian configuration allows us to build -- docs @@ -354,12 +355,12 @@ getTestArgs = do Just verbosity -> Just $ "--verbose=" ++ verbosity wayArgs = map ("--way=" ++) (testWays args) compilerArg = ["--config", "compiler=" ++ show (compiler)] - ghcPkgArg = ["--config", "ghc_pkg=" ++ show (bindir -/- "ghc-pkg" <.> exe)] + ghcPkgArg = ["--config", "ghc_pkg=" ++ show (bindir -/- (cross_prefix <> "ghc-pkg") <.> exe)] haddockArg = if haveDocs - then [ "--config", "haddock=" ++ show (bindir -/- "haddock" <.> exe) ] + then [ "--config", "haddock=" ++ show (bindir -/- (cross_prefix <> "haddock") <.> exe) ] else [ "--config", "haddock=" ] - hp2psArg = ["--config", "hp2ps=" ++ show (bindir -/- "hp2ps" <.> exe)] - hpcArg = ["--config", "hpc=" ++ show (bindir -/- "hpc" <.> exe)] + hp2psArg = ["--config", "hp2ps=" ++ show (bindir -/- (cross_prefix <> "hp2ps") <.> exe)] + hpcArg = ["--config", "hpc=" ++ show (bindir -/- (cross_prefix <> "hpc") <.> exe)] inTreeArg = [ "-e", "config.in_tree_compiler=" ++ show (isInTreeCompiler (testCompiler args) || testHasInTreeFiles args) ] |