summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Pipeline
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-03-23 17:37:25 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-04-06 13:01:28 -0400
commit694d39f0391c58cd926887e274c227e99099a900 (patch)
tree0e4dfc3c591aba6cad52697f29ba7608d43f48ad /compiler/GHC/Driver/Pipeline
parent400666c81af024b6d16100aba88c2e8e78e8eef8 (diff)
downloadhaskell-694d39f0391c58cd926887e274c227e99099a900.tar.gz
driver: Make object merging optional
On Windows we don't have a linker which supports object joining (i.e. the `-r` flag). Consequently, `-pgmlm` is now a `Maybe`. See #21068.
Diffstat (limited to 'compiler/GHC/Driver/Pipeline')
-rw-r--r--compiler/GHC/Driver/Pipeline/Execute.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Pipeline/Execute.hs b/compiler/GHC/Driver/Pipeline/Execute.hs
index 55a1573d92..c6fcce9e4c 100644
--- a/compiler/GHC/Driver/Pipeline/Execute.hs
+++ b/compiler/GHC/Driver/Pipeline/Execute.hs
@@ -1153,7 +1153,7 @@ joinObjectFiles hsc_env o_files output_fn
withAtomicRename output_fn $ \tmp_ar ->
liftIO $ runAr logger dflags Nothing $ map Option $ ["rc", tmp_ar] ++ o_files
where
- can_merge_objs = False -- XXX
+ can_merge_objs = isJust (pgm_lm (hsc_dflags hsc_env))
dflags = hsc_dflags hsc_env
tmpfs = hsc_tmpfs hsc_env
logger = hsc_logger hsc_env