summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main/DriverPipeline.hs4
-rw-r--r--compiler/main/DynFlags.hs4
2 files changed, 7 insertions, 1 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 1849c6b91e..c4ac65f7b6 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1590,7 +1590,9 @@ linkDynLib dflags o_files dep_packages = do
, SysTools.Option "-o"
, SysTools.FileOption "" output_fn
, SysTools.Option "-shared"
- , SysTools.FileOption "-Wl,--out-implib=" (output_fn ++ ".a")
+ ] ++
+ [ SysTools.FileOption "-Wl,--out-implib=" (output_fn ++ ".a")
+ | dopt Opt_SharedImplib dflags
]
++ map (SysTools.FileOption "") o_files
++ map SysTools.Option (
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index bebea761cd..37f1171eec 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -310,6 +310,7 @@ data DynFlag
| Opt_GenManifest
| Opt_EmbedManifest
| Opt_EmitExternalCore
+ | Opt_SharedImplib
-- temporary flags
| Opt_RunCPS
@@ -694,6 +695,8 @@ defaultDynFlags =
Opt_DoAsmMangling,
+ Opt_SharedImplib,
+
Opt_GenManifest,
Opt_EmbedManifest,
Opt_PrintBindContents
@@ -1742,6 +1745,7 @@ fFlags = [
( "gen-manifest", Opt_GenManifest, const Supported ),
( "embed-manifest", Opt_EmbedManifest, const Supported ),
( "ext-core", Opt_EmitExternalCore, const Supported ),
+ ( "shared-implib", Opt_SharedImplib, const Supported ),
( "implicit-import-qualified", Opt_ImplicitImportQualified, const Supported )
]