Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 323eb8f0 by Cheng Shao at 2026-01-18T21:48:19-05:00 hadrian: enable split sections for cross stage0 This patch fixes a minor issue with `splitSectionsArgs` in hadrian: previously, it's unconditionally disabled for stage0 libraries because it's not going to be shipped in the final bindists. But it's only true when not cross compiling. So for now we also need to enable it for cross stage0 as well. - - - - - 1 changed file: - hadrian/src/Settings/Builders/SplitSections.hs Changes: ===================================== hadrian/src/Settings/Builders/SplitSections.hs ===================================== @@ -4,25 +4,26 @@ module Settings.Builders.SplitSections where import Expression import Packages import Settings +import Settings.Builders.Common import Flavour.Type -import Oracles.Setting -- | Does it make sense to enable or disable split sections? splitSectionsArgs :: Args splitSectionsArgs = do pkg <- getPackage osx <- expr isOsxTarget + cross <- expr $ flag CrossCompiling notSt0 <- notStage0 flav <- expr flavour if ( ghcSplitSections flav -- Flavour enables split-sections && not osx -- OS X doesn't support split sections - && notSt0 + && (cross || notSt0) -- Disable for stage 0 because we aren't going to ship -- the resulting binaries and consequently there is no - -- reason to minimize size. + -- reason to minimize size. Unless cross compiling. && (pkg /= ghc) -- Disable section splitting for the GHC library. -- It takes too long and there is little benefit. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/323eb8f0224b0f81ffc5e7976cb54951... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/323eb8f0224b0f81ffc5e7976cb54951... You're receiving this email because of your account on gitlab.haskell.org.