[Git][ghc/ghc][wip/romes/hadrian-cross-stage2-rebase_SVEN_FIXED] 2 commits: Adjust host_fully_static for stage2 cross builds
Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FIXED at Glasgow Haskell Compiler / GHC Commits: 6e9fb70e by GHC GitLab CI at 2025-10-12T12:21:57+02:00 Adjust host_fully_static for stage2 cross builds - - - - - 65fe6b6b by GHC GitLab CI at 2025-10-12T12:22:39+02:00 Reference correct package.conf.d for cross - - - - - 2 changed files: - hadrian/src/Flavour.hs - hadrian/src/Settings/Builders/RunTest.hs Changes: ===================================== hadrian/src/Flavour.hs ===================================== @@ -402,17 +402,35 @@ fullyStatic flavour = -- libraries. hostFullyStatic :: Flavour -> Flavour hostFullyStatic flavour = - addArgs staticExec $ disableDynamicGhcPrograms flavour + addArgs staticExec . noDynamicRts $ disableDynamicGhcPrograms flavour where -- Unlike 'fullyStatic', we need to ensure these flags are only -- applied to host code. staticExec :: Args - staticExec = stage0 ? mconcat + staticExec = stage1 ? mconcat [ builder (Ghc CompileHs) ? pure [ "-fPIC", "-static" ] , builder (Ghc CompileCWithGhc) ? pure [ "-fPIC", "-optc", "-static"] , builder (Ghc LinkHs) ? pure [ "-optl", "-static" ] ] + noDynamicRts :: Flavour -> Flavour + noDynamicRts f = + f + { rtsWays = do + ws <- rtsWays f + mconcat + [ notM stage1 ? pure ws, + stage1 + ? pure (ws `Set.difference` Set.fromList [dynamic, profilingDynamic, threadedDynamic, threadedDebugDynamic, threadedProfilingDynamic, threadedDebugProfilingDynamic, debugDynamic, debugProfilingDynamic]) + ] + , libraryWays = do + ws <- libraryWays f + mconcat + [ notM stage1 ? pure ws, + stage1 + ? pure (ws `Set.difference` Set.fromList [dynamic, profilingDynamic, threadedDynamic, threadedDebugDynamic, threadedProfilingDynamic, threadedDebugProfilingDynamic, debugDynamic, debugProfilingDynamic ]) + ] + } -- | Build stage2 dependencies with options to enable collection of compiler -- stats. ===================================== hadrian/src/Settings/Builders/RunTest.hs ===================================== @@ -96,8 +96,9 @@ allowHaveLLVM = not . (`elem` ["wasm32", "javascript"]) -- inTreeCompilerArgs :: Stage -> Action TestCompilerArgs inTreeCompilerArgs stg = do - + isCrossStage <- crossStage stg let ghcStage = succStage stg + pkgCacheStage = if isCrossStage then ghcStage else stg (hasDynamicRts, hasThreadedRts) <- do ways <- interpretInContext (vanillaContext ghcStage rts) getRtsWays return (dynamic `elem` ways, threaded `elem` ways) @@ -130,7 +131,7 @@ inTreeCompilerArgs stg = do top <- topDirectory pkgConfCacheFile <- System.FilePath.normalise . (top -/-) - <$> (packageDbPath (PackageDbLoc stg Final) <&> (-/- "package.cache")) + <$> (packageDbPath (PackageDbLoc pkgCacheStage Final) <&> (-/- "package.cache")) libdir <- System.FilePath.normalise . (top -/-) <$> stageLibPath stg View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d8adb9c7fe06eae1514301facf3245b... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d8adb9c7fe06eae1514301facf3245b... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Sven Tennie (@supersven)