summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Pipeline/Execute.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-03-28 12:08:01 -0400
committerBen Gamari <ben@smart-cactus.org>2022-04-04 03:33:58 -0400
commit517ddff9b685d57475b63d73bab6bb623c24cd76 (patch)
tree31bc9a42329f9a5c5eb8242f0d7185e6c53761d8 /compiler/GHC/Driver/Pipeline/Execute.hs
parentedbfea66d149a056640a5f7e358234171e67a4ee (diff)
downloadhaskell-wip/object-merging-via-archives.tar.gz
Build ar archives with -L when "joining" objectswip/object-merging-via-archives
Since there may be .o files which are in fact archives.
Diffstat (limited to 'compiler/GHC/Driver/Pipeline/Execute.hs')
-rw-r--r--compiler/GHC/Driver/Pipeline/Execute.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Pipeline/Execute.hs b/compiler/GHC/Driver/Pipeline/Execute.hs
index 902ef68f3a..8a185bf4ec 100644
--- a/compiler/GHC/Driver/Pipeline/Execute.hs
+++ b/compiler/GHC/Driver/Pipeline/Execute.hs
@@ -1179,8 +1179,10 @@ joinObjectFiles hsc_env o_files output_fn
| otherwise = do
withAtomicRename output_fn $ \tmp_ar ->
- liftIO $ runAr logger dflags Nothing $ map Option $ ["rc", tmp_ar] ++ o_files
+ liftIO $ runAr logger dflags Nothing $ map Option $ ["qc" ++ dashL, tmp_ar] ++ o_files
where
+ dashLSupported = sArSupportsDashL (settings dflags)
+ dashL = if dashLSupported then "L" else ""
can_merge_objs = isJust (pgm_lm (hsc_dflags hsc_env))
dflags = hsc_dflags hsc_env
tmpfs = hsc_tmpfs hsc_env