summaryrefslogtreecommitdiff
path: root/compiler/main/DriverPipeline.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/main/DriverPipeline.hs')
-rw-r--r--compiler/main/DriverPipeline.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index fdae0fa20e..bdc2e8e812 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -2134,6 +2134,12 @@ joinObjectFiles dflags o_files output_fn = do
script <- newTempName dflags "ldscript"
writeFile script $ "INPUT(" ++ unwords o_files ++ ")"
ld_r [SysTools.FileOption "" script]
+ else if sLdSupportsFilelist mySettings
+ then do
+ filelist <- newTempName dflags "filelist"
+ writeFile filelist $ unlines o_files
+ ld_r [SysTools.Option "-Wl,-filelist",
+ SysTools.FileOption "-Wl," filelist]
else do
ld_r (map (SysTools.FileOption "") o_files)