summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Pipeline
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-03-28 12:08:01 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-04-06 13:01:28 -0400
commitd2ae0a3a1a8e31e5d769f1aea95e85793043cb3a (patch)
tree37951c698d81838d84b4104936371d39e013b4b1 /compiler/GHC/Driver/Pipeline
parent295c35c5cfda67c11222f99fb338d3cac52abac1 (diff)
downloadhaskell-d2ae0a3a1a8e31e5d769f1aea95e85793043cb3a.tar.gz
Build ar archives with -L when "joining" objects
Since there may be .o files which are in fact archives.
Diffstat (limited to 'compiler/GHC/Driver/Pipeline')
-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