[commit: ghc] ghc-8.2: Drop special handling of iOS and Android (bb6c7f3)

git at git.haskell.org git at git.haskell.org
Sun Dec 23 18:46:51 UTC 2018


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

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/bb6c7f345b284ec1fade421bbb38a1bf334b2c9f/ghc

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

commit bb6c7f345b284ec1fade421bbb38a1bf334b2c9f
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
    
    (cherry picked from commit cb4878ffd18a3c70f98bdbb413cd3c4d1f054e1f)


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

bb6c7f345b284ec1fade421bbb38a1bf334b2c9f
 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 678c838..e21e7dc 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 c23d55e..4cfc48e 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 56d2ac5..e16452b 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 bed4d68..61cc24e 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 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