summaryrefslogtreecommitdiff
path: root/hadrian/src/Flavour.hs
diff options
context:
space:
mode:
Diffstat (limited to 'hadrian/src/Flavour.hs')
-rw-r--r--hadrian/src/Flavour.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs
index 9c28397b31..f1e4aba881 100644
--- a/hadrian/src/Flavour.hs
+++ b/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.