mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 16:23:26 +00:00
4b2eceaa35
See https://phabricator.haskell.org/D4714 for the full details. This will be part of ghc 8.6. Closes https://github.com/NixOS/nixpkgs/pull/40877.
25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
|
|
index acd0d61..3e83c15 100644
|
|
--- a/compiler/main/DriverPipeline.hs
|
|
+++ b/compiler/main/DriverPipeline.hs
|
|
@@ -1916,6 +1916,7 @@ linkBinary' staticLink dflags o_files dep_packages = do
|
|
++ pkg_framework_opts
|
|
++ debug_opts
|
|
++ thread_opts
|
|
+ ++ (if (platformOS platform `elem` [OSDarwin]) then [ "-Wl,-dead_strip_dylibs" ] else [])
|
|
))
|
|
|
|
exeFileName :: Bool -> DynFlags -> FilePath
|
|
diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs
|
|
index 1ab5b13..2ebbf51 100644
|
|
--- a/compiler/main/SysTools.hs
|
|
+++ b/compiler/main/SysTools.hs
|
|
@@ -1737,6 +1737,7 @@ linkDynLib dflags0 o_files dep_packages
|
|
++ map Option pkg_lib_path_opts
|
|
++ map Option pkg_link_opts
|
|
++ map Option pkg_framework_opts
|
|
+ ++ [ Option "-Wl,-dead_strip_dylibs" ]
|
|
)
|
|
OSiOS -> throwGhcExceptionIO (ProgramError "dynamic libraries are not supported on iOS target")
|
|
_ -> do
|