[commit: ghc] master: Drop special handling of iOS and Android (cb4878f)

git at git.haskell.org git at git.haskell.org
Fri Sep 8 02:53:50 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/cb4878ffd18a3c70f98bdbb413cd3c4d1f054e1f/ghc

>---------------------------------------------------------------

commit cb4878ffd18a3c70f98bdbb413cd3c4d1f054e1f
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date:   Thu Sep 7 22:52:27 2017 -0400

    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


>---------------------------------------------------------------

cb4878ffd18a3c70f98bdbb413cd3c4d1f054e1f
 aclocal.m4                      | 10 ++--------
 compiler/main/DriverPipeline.hs |  2 +-
 compiler/main/HscTypes.hs       |  1 -
 compiler/main/SysTools.hs       |  5 +----
 compiler/utils/Platform.hs      |  7 -------
 5 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index d365dba..8146e79 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 ef31238..bf39ee1 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -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
diff --git a/compiler/main/HscTypes.hs b/compiler/main/HscTypes.hs
index e064147..2d8e19c 100644
--- a/compiler/main/HscTypes.hs
+++ b/compiler/main/HscTypes.hs
@@ -2602,7 +2602,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 cd7a23d..04f4107 100644
--- a/compiler/main/SysTools.hs
+++ b/compiler/main/SysTools.hs
@@ -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
             -------------------------------------------------------------------
diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs
index 7f74970..8cd1fa7 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
 



More information about the ghc-commits mailing list