diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2017-09-07 22:52:27 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-10-03 11:33:20 -0400 |
commit | bb6c7f345b284ec1fade421bbb38a1bf334b2c9f (patch) | |
tree | e04b7e6b721e145ab238956a71c5dfd86ca3ca55 | |
parent | be30d37b2e8bd6b76525e20a0131314492fa4cc2 (diff) | |
download | haskell-bb6c7f345b284ec1fade421bbb38a1bf334b2c9f.tar.gz |
Drop special handling of iOS and Android
As far as GHC is concerned, iOS **is** Darwin, and
Android **is** Linux.
Depends on D3352
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: Ericson2314, ryantrinkle, rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3579
(cherry picked from commit cb4878ffd18a3c70f98bdbb413cd3c4d1f054e1f)
-rw-r--r-- | aclocal.m4 | 10 | ||||
-rw-r--r-- | compiler/main/DriverPipeline.hs | 2 | ||||
-rw-r--r-- | compiler/main/HscTypes.hs | 1 | ||||
-rw-r--r-- | compiler/main/SysTools.hs | 5 | ||||
-rw-r--r-- | compiler/utils/Platform.hs | 7 |
5 files changed, 4 insertions, 21 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 678c838393..e21e7dc2a0 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -237,13 +237,10 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS], checkOS() { case [$]1 in - linux) + linux|linux-android) test -z "[$]2" || eval "[$]2=OSLinux" ;; - ios) - test -z "[$]2" || eval "[$]2=OSiOS" - ;; - darwin) + darwin|ios) test -z "[$]2" || eval "[$]2=OSDarwin" ;; solaris2) @@ -279,9 +276,6 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS], aix) test -z "[$]2" || eval "[$]2=OSAIX" ;; - linux-android) - test -z "[$]2" || eval "[$]2=OSAndroid" - ;; *) echo "Unknown OS '[$]1'" exit 1 diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index c23d55e550..4cfc48eaa3 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1990,7 +1990,7 @@ linkBinary' staticLink dflags o_files dep_packages = do -- on x86. ++ (if sLdSupportsCompactUnwind mySettings && not staticLink && - (platformOS platform == OSDarwin || platformOS platform == OSiOS) && + (platformOS platform == OSDarwin) && case platformArch platform of ArchX86 -> True ArchX86_64 -> True diff --git a/compiler/main/HscTypes.hs b/compiler/main/HscTypes.hs index 56d2ac5eb9..e16452bca1 100644 --- a/compiler/main/HscTypes.hs +++ b/compiler/main/HscTypes.hs @@ -2578,7 +2578,6 @@ soExt :: Platform -> FilePath soExt platform = case platformOS platform of OSDarwin -> "dylib" - OSiOS -> "dylib" OSMinGW32 -> "dll" _ -> "so" diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs index bed4d68f83..61cc24efcf 100644 --- a/compiler/main/SysTools.hs +++ b/compiler/main/SysTools.hs @@ -835,9 +835,6 @@ getLinkerInfo' dflags = do -- that doesn't support --version. We can just assume that's -- what we're using. return $ DarwinLD [] - OSiOS -> - -- Ditto for iOS - return $ DarwinLD [] OSMinGW32 -> -- GHC doesn't support anything but GNU ld on Windows anyway. -- Process creation is also fairly expensive on win32, so @@ -1683,7 +1680,7 @@ linkDynLib dflags0 o_files dep_packages ++ pkg_lib_path_opts ++ pkg_link_opts )) - _ | os `elem` [OSDarwin, OSiOS] -> do + _ | os == OSDarwin -> do ------------------------------------------------------------------- -- Making a darwin dylib ------------------------------------------------------------------- diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs index 7f749708b9..8cd1fa75e3 100644 --- a/compiler/utils/Platform.hs +++ b/compiler/utils/Platform.hs @@ -75,7 +75,6 @@ data OS = OSUnknown | OSLinux | OSDarwin - | OSiOS | OSSolaris2 | OSMinGW32 | OSFreeBSD @@ -85,7 +84,6 @@ data OS | OSKFreeBSD | OSHaiku | OSQNXNTO - | OSAndroid | OSAIX deriving (Read, Show, Eq) @@ -131,12 +129,10 @@ osElfTarget OSOpenBSD = True osElfTarget OSNetBSD = True osElfTarget OSSolaris2 = True osElfTarget OSDarwin = False -osElfTarget OSiOS = False osElfTarget OSMinGW32 = False osElfTarget OSKFreeBSD = True osElfTarget OSHaiku = True osElfTarget OSQNXNTO = False -osElfTarget OSAndroid = True osElfTarget OSAIX = False osElfTarget OSUnknown = False -- Defaulting to False is safe; it means don't rely on any @@ -147,12 +143,10 @@ osElfTarget OSUnknown = False -- | This predicate tells us whether the OS support Mach-O shared libraries. osMachOTarget :: OS -> Bool osMachOTarget OSDarwin = True -osMachOTarget OSiOS = True osMachOTarget _ = False osUsesFrameworks :: OS -> Bool osUsesFrameworks OSDarwin = True -osUsesFrameworks OSiOS = True osUsesFrameworks _ = False platformUsesFrameworks :: Platform -> Bool @@ -160,6 +154,5 @@ platformUsesFrameworks = osUsesFrameworks . platformOS osSubsectionsViaSymbols :: OS -> Bool osSubsectionsViaSymbols OSDarwin = True -osSubsectionsViaSymbols OSiOS = True osSubsectionsViaSymbols _ = False |