[Git][ghc/ghc][master] hadrian: Ensure that linker scripts are used when merging objects
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Sun Dec 25 02:10:13 UTC 2022
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
6d7d4393 by Ben Gamari at 2022-12-24T21:09:56-05:00
hadrian: Ensure that linker scripts are used when merging objects
In #22527 @rui314 inadvertantly pointed out a glaring bug in Hadrian's
implementation of the object merging rules: unlike the old `make` build
system we utterly failed to pass the needed linker scripts. Fix this.
- - - - -
1 changed file:
- hadrian/src/Flavour.hs
Changes:
=====================================
hadrian/src/Flavour.hs
=====================================
@@ -193,8 +193,12 @@ splitSectionsIf pkgPredicate = addArgs $ do
pkg <- getPackage
osx <- expr isOsxTarget
not osx ? -- osx doesn't support split sections
- pkgPredicate pkg ? -- Only apply to these packages
- builder (Ghc CompileHs) ? arg "-split-sections"
+ pkgPredicate pkg ? mconcat -- Only apply to these packages
+ [ builder (Ghc CompileHs) ? arg "-split-sections"
+ , builder MergeObjects ? ifM (expr isWinTarget)
+ (pure ["-t", "driver/utils/merge_sections_pe.ld"])
+ (pure ["-t", "driver/utils/merge_sections.ld"])
+ ]
-- | Like 'splitSectionsIf', but with a fixed predicate: use
-- split sections for all packages but the GHC library.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6d7d4393e15a6d0a2b42ec986ec6bd3df27baaa7
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6d7d4393e15a6d0a2b42ec986ec6bd3df27baaa7
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/20221224/6fbd8799/attachment-0001.html>
More information about the ghc-commits
mailing list