diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-04-27 12:45:04 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-04-27 13:11:03 +0100 |
commit | e5944d9f04bc6f6e62367be71d5b76e7d0473ee2 (patch) | |
tree | 75f35c7599cd099c8acb860b6902d682cd6c1c17 /compiler/main/DriverPipeline.hs | |
parent | f6e0dbf32bb19e79690f2233bb925a404f3ab1b6 (diff) | |
download | haskell-e5944d9f04bc6f6e62367be71d5b76e7d0473ee2.tar.gz |
Don't use getPackageLinkOpts on iOS; fixes #7720.
On iOS, binaries are really static libraries, so we don't want to use
flags like -lm when linking them.
Diffstat (limited to 'compiler/main/DriverPipeline.hs')
-rw-r--r-- | compiler/main/DriverPipeline.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 1328ffe209..6c4bff9364 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1819,7 +1819,13 @@ linkBinary dflags o_files dep_packages = do extraLinkObj <- mkExtraObjToLinkIntoBinary dflags noteLinkObjs <- mkNoteObjsToLinkIntoBinary dflags dep_packages - pkg_link_opts <- getPackageLinkOpts dflags dep_packages + pkg_link_opts <- if platformBinariesAreStaticLibs platform + then -- If building an executable really means + -- making a static library (e.g. iOS), then + -- we don't want the options (like -lm) + -- that getPackageLinkOpts gives us. #7720 + return [] + else getPackageLinkOpts dflags dep_packages pkg_framework_path_opts <- if platformUsesFrameworks platform |