Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
4c58a3ae
by Cheng Shao at 2026-03-11T15:09:22-04:00
2 changed files:
Changes:
| ... | ... | @@ -59,14 +59,17 @@ compilePackage rs = do |
| 59 | 59 | -- When building dynamically we depend on the static rule if shared libs
|
| 60 | 60 | -- are supported, because it will add the -dynamic-too flag when
|
| 61 | 61 | -- compiling to build the dynamic files alongside the static files
|
| 62 | - ( root -/- "**/build/**/*.dyn_o" :& root -/- "**/build/**/*.dyn_hi" :& Nil )
|
|
| 62 | + forM_ wayPats $ \wayPat -> ( root -/- ("**/build/**/*." ++ wayPat ++ "dyn_o") :& root -/- ("**/build/**/*." ++ wayPat ++ "dyn_hi") :& Nil )
|
|
| 63 | 63 | &%> \ ( dyn_o :& _dyn_hi :& _ ) -> do
|
| 64 | 64 | p <- platformSupportsSharedLibs
|
| 65 | 65 | if p
|
| 66 | 66 | then do
|
| 67 | + b <- parsePath (parseBuildObject root) "<object file path parser>" dyn_o
|
|
| 68 | + let ctx = objectContext b
|
|
| 69 | + way = removeWayUnit Dynamic $ C.way ctx
|
|
| 67 | 70 | -- We `need` ".o/.hi" because GHC is called with `-dynamic-too`
|
| 68 | 71 | -- and builds ".dyn_o/.dyn_hi" too.
|
| 69 | - changed <- needHasChanged [dyn_o -<.> "o", dyn_o -<.> "hi"]
|
|
| 72 | + changed <- needHasChanged [dyn_o -<.> osuf way, dyn_o -<.> hisuf way]
|
|
| 70 | 73 | |
| 71 | 74 | -- If for some reason a previous Hadrian execution has been
|
| 72 | 75 | -- interrupted after the rule for .o/.hi generation has completed
|
| ... | ... | @@ -34,6 +34,8 @@ compileAndLinkHs = (builder (Ghc CompileHs) ||^ builder (Ghc LinkHs)) ? do |
| 34 | 34 | useColor <- shakeColor <$> expr getShakeOptions
|
| 35 | 35 | let hasVanilla = elem vanilla ways
|
| 36 | 36 | hasDynamic = elem dynamic ways
|
| 37 | + hasProfiling = elem profiling ways
|
|
| 38 | + hasProfilingDynamic = elem profilingDynamic ways
|
|
| 37 | 39 | hieFiles <- ghcHieFiles <$> expr flavour
|
| 38 | 40 | stage <- getStage
|
| 39 | 41 | hie_path <- getHieBuildPath
|
| ... | ... | @@ -46,6 +48,12 @@ compileAndLinkHs = (builder (Ghc CompileHs) ||^ builder (Ghc LinkHs)) ? do |
| 46 | 48 | , (hasVanilla && hasDynamic) ? builder (Ghc CompileHs) ?
|
| 47 | 49 | platformSupportsSharedLibs ? way vanilla ?
|
| 48 | 50 | arg "-dynamic-too"
|
| 51 | + , (hasProfiling && hasProfilingDynamic) ? builder (Ghc CompileHs) ?
|
|
| 52 | + platformSupportsSharedLibs ? way profiling ? mconcat
|
|
| 53 | + [ arg "-dynamic-too"
|
|
| 54 | + , arg "-dynosuf", arg $ osuf profilingDynamic
|
|
| 55 | + , arg "-dynhisuf", arg $ hisuf profilingDynamic
|
|
| 56 | + ]
|
|
| 49 | 57 | , commonGhcArgs
|
| 50 | 58 | , ghcLinkArgs
|
| 51 | 59 | , defaultGhcWarningsArgs
|