summaryrefslogtreecommitdiff
path: root/compiler/main
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2013-08-13 16:40:37 -0500
committerAustin Seipp <aseipp@pobox.com>2013-08-14 00:42:43 -0500
commit288ca49c93d5bc8fe42f9a823ed6555334762769 (patch)
tree89fb7fc4c680cd434b287165d43e4970938df17e /compiler/main
parent5fb72555f7b7ab67a33583f33ad9160761ca434f (diff)
downloadhaskell-288ca49c93d5bc8fe42f9a823ed6555334762769.tar.gz
iOS: generate archive files when compiling.
When cross compiling to iOS, we generate archive files which are linked into the final executable. We already *did* generate archive files - just with the wrong suffix. Fixes #8125. Authored-by: Stephen Blackheath <...@blacksapphire.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'compiler/main')
-rw-r--r--compiler/main/DriverPipeline.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index aa49e70eb7..c5bcdc7a65 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1938,15 +1938,16 @@ linkBinary dflags o_files dep_packages = do
exeFileName :: DynFlags -> FilePath
exeFileName dflags
| Just s <- outputFile dflags =
- if platformOS (targetPlatform dflags) == OSMinGW32
- then if null (takeExtension s)
- then s <.> "exe"
- else s
- else s
+ case platformOS (targetPlatform dflags) of
+ OSMinGW32 -> s <?.> "exe"
+ OSiOS -> s <?.> "a"
+ _ -> s
| otherwise =
if platformOS (targetPlatform dflags) == OSMinGW32
then "main.exe"
else "a.out"
+ where s <?.> ext | null (takeExtension s) = s <.> ext
+ | otherwise = s
maybeCreateManifest
:: DynFlags