Commit cb4878ff authored by Moritz Angermann's avatar Moritz Angermann Committed by Ben Gamari

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
parent be514a69
......@@ -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
......
......@@ -2006,7 +2006,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
......
......@@ -2602,7 +2602,6 @@ soExt :: Platform -> FilePath
soExt platform
= case platformOS platform of
OSDarwin -> "dylib"
OSiOS -> "dylib"
OSMinGW32 -> "dll"
_ -> "so"
......
......@@ -822,9 +822,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
......@@ -1488,7 +1485,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
-------------------------------------------------------------------
......
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment