[Git][ghc/ghc][wip/hadrian-cross-stage2] Correct GHC_PKG path

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Wed Nov 1 16:49:45 UTC 2023



Matthew Pickering pushed to branch wip/hadrian-cross-stage2 at Glasgow Haskell Compiler / GHC


Commits:
af3cf674 by GHC GitLab CI at 2023-11-01T16:47:29+00:00
Correct GHC_PKG path

- - - - -


1 changed file:

- hadrian/src/Rules/Test.hs


Changes:

=====================================
hadrian/src/Rules/Test.hs
=====================================
@@ -235,10 +235,10 @@ testRules = do
         pythonPath      <- builderPath Python
 
         testGhc <- testCompiler <$> userSetting defaultTestArgs
-        bindir <- getBinaryDirectory testGhc
         cross <- getBooleanSetting TestCrossCompiling
-        test_target_platform <- getTestSetting TestTARGETPLATFORM
-        let cross_prefix = if cross then test_target_platform ++ "-" else ""
+        bindir <- getBinaryDirectory testGhc
+        compiler_path <- getCompilerPath testGhc
+        let cross_prefix = if cross then dropWhileEnd ((/=) '-') (takeFileName compiler_path) else ""
 
         let exe_path :: Package -> String
             exe_path pkg = bindir </> (cross_prefix ++  programBasename vanilla pkg) <.> exe



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/af3cf674fced3a22856b39ad6fba3a178ebf5d89

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/af3cf674fced3a22856b39ad6fba3a178ebf5d89
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231101/6dd91b4d/attachment.html>


More information about the ghc-commits mailing list