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
-
65fe6b6b
by GHC GitLab CI at 2025-10-12T12:22:39+02:00
2 changed files:
Changes:
| ... | ... | @@ -402,17 +402,35 @@ fullyStatic flavour = |
| 402 | 402 | -- libraries.
|
| 403 | 403 | hostFullyStatic :: Flavour -> Flavour
|
| 404 | 404 | hostFullyStatic flavour =
|
| 405 | - addArgs staticExec $ disableDynamicGhcPrograms flavour
|
|
| 405 | + addArgs staticExec . noDynamicRts $ disableDynamicGhcPrograms flavour
|
|
| 406 | 406 | where
|
| 407 | 407 | -- Unlike 'fullyStatic', we need to ensure these flags are only
|
| 408 | 408 | -- applied to host code.
|
| 409 | 409 | staticExec :: Args
|
| 410 | - staticExec = stage0 ? mconcat
|
|
| 410 | + staticExec = stage1 ? mconcat
|
|
| 411 | 411 | [
|
| 412 | 412 | builder (Ghc CompileHs) ? pure [ "-fPIC", "-static" ]
|
| 413 | 413 | , builder (Ghc CompileCWithGhc) ? pure [ "-fPIC", "-optc", "-static"]
|
| 414 | 414 | , builder (Ghc LinkHs) ? pure [ "-optl", "-static" ]
|
| 415 | 415 | ]
|
| 416 | + noDynamicRts :: Flavour -> Flavour
|
|
| 417 | + noDynamicRts f =
|
|
| 418 | + f
|
|
| 419 | + { rtsWays = do
|
|
| 420 | + ws <- rtsWays f
|
|
| 421 | + mconcat
|
|
| 422 | + [ notM stage1 ? pure ws,
|
|
| 423 | + stage1
|
|
| 424 | + ? pure (ws `Set.difference` Set.fromList [dynamic, profilingDynamic, threadedDynamic, threadedDebugDynamic, threadedProfilingDynamic, threadedDebugProfilingDynamic, debugDynamic, debugProfilingDynamic])
|
|
| 425 | + ]
|
|
| 426 | + , libraryWays = do
|
|
| 427 | + ws <- libraryWays f
|
|
| 428 | + mconcat
|
|
| 429 | + [ notM stage1 ? pure ws,
|
|
| 430 | + stage1
|
|
| 431 | + ? pure (ws `Set.difference` Set.fromList [dynamic, profilingDynamic, threadedDynamic, threadedDebugDynamic, threadedProfilingDynamic, threadedDebugProfilingDynamic, debugDynamic, debugProfilingDynamic ])
|
|
| 432 | + ]
|
|
| 433 | + }
|
|
| 416 | 434 | |
| 417 | 435 | -- | Build stage2 dependencies with options to enable collection of compiler
|
| 418 | 436 | -- stats.
|
| ... | ... | @@ -96,8 +96,9 @@ allowHaveLLVM = not . (`elem` ["wasm32", "javascript"]) |
| 96 | 96 | --
|
| 97 | 97 | inTreeCompilerArgs :: Stage -> Action TestCompilerArgs
|
| 98 | 98 | inTreeCompilerArgs stg = do
|
| 99 | - |
|
| 99 | + isCrossStage <- crossStage stg
|
|
| 100 | 100 | let ghcStage = succStage stg
|
| 101 | + pkgCacheStage = if isCrossStage then ghcStage else stg
|
|
| 101 | 102 | (hasDynamicRts, hasThreadedRts) <- do
|
| 102 | 103 | ways <- interpretInContext (vanillaContext ghcStage rts) getRtsWays
|
| 103 | 104 | return (dynamic `elem` ways, threaded `elem` ways)
|
| ... | ... | @@ -130,7 +131,7 @@ inTreeCompilerArgs stg = do |
| 130 | 131 | top <- topDirectory
|
| 131 | 132 | |
| 132 | 133 | pkgConfCacheFile <- System.FilePath.normalise . (top -/-)
|
| 133 | - <$> (packageDbPath (PackageDbLoc stg Final) <&> (-/- "package.cache"))
|
|
| 134 | + <$> (packageDbPath (PackageDbLoc pkgCacheStage Final) <&> (-/- "package.cache"))
|
|
| 134 | 135 | libdir <- System.FilePath.normalise . (top -/-)
|
| 135 | 136 | <$> stageLibPath stg
|
| 136 | 137 |