Commit 28de21d9 authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 1638193 - Remove build system support for iOS. r=nalexander

iOS support for Gecko has not been tested in years and is most probably
out of date. The build system part of it, specifically the checks in
build/autoconf/ios.m4, are not trivial to port to python configure, and
they prevent other things from moving to python configure (because some
of them change value when MOZ_IOS is set).

The code is left alone, although it could probably be stripped off as
well, but I'll leave that as an exercise for someone else.

Differential Revision: https://phabricator.services.mozilla.com/D75463
parent 35818794
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ builtin(include, build/autoconf/zlib.m4)dnl
builtin(include, build/autoconf/icu.m4)dnl
builtin(include, build/autoconf/clang-plugin.m4)dnl
builtin(include, build/autoconf/alloc.m4)dnl
builtin(include, build/autoconf/ios.m4)dnl
builtin(include, build/autoconf/sanitize.m4)dnl

MOZ_PROG_CHECKMSYS()

build/autoconf/ios.m4

deleted100644 → 0
+0 −107
Original line number Diff line number Diff line
dnl This Source Code Form is subject to the terms of the Mozilla Public
dnl License, v. 2.0. If a copy of the MPL was not distributed with this
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.

AC_DEFUN([MOZ_IOS_PATH_PROG],
[
changequote({,})
_prog_name=ifelse($2, {}, `echo $1 | tr "[:upper:]" "[:lower:]"`, $2)
changequote([,])
AC_CACHE_CHECK([for $_prog_name in iOS SDK],
ac_cv_ios_path_$1,
[
_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null`
_res=$?
if test $_res -ne 0; then
   AC_MSG_ERROR([Could not find '$_prog_name' in the iOS SDK])
fi
ac_cv_ios_path_$1=$_path
])
$1="${ac_cv_ios_path_$1}$3"
])

AC_DEFUN([MOZ_IOS_SDK],
[

MOZ_ARG_WITH_STRING(ios-sdk,
[  --with-ios-sdk=TYPE
                          Type of iOS SDK to use (iphonesimulator, iphoneos)
                          and optionally version (like iphoneos8.2)],
    ios_sdk=$withval)

MOZ_ARG_ENABLE_STRING(ios-target,
                      [  --enable-ios-target=VER (default=8.0)
                          Set the minimum iOS version needed at runtime],
                      [_IOS_TARGET=$enableval])
_IOS_TARGET_DEFAULT=8.0

case "$target" in
arm*-apple-darwin*)
    if test -z "$ios_sdk" -o "$ios_sdk" = "yes"; then
       ios_sdk=iphoneos
    fi
    case "$ios_sdk" in
         iphoneos*)
                ios_target_arg="-miphoneos-version-min"
                ;;
         *)
                AC_MSG_ERROR([Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'.])
                ;;
    esac
    ;;
*-apple-darwin*)
    ios_target_arg="-mios-simulator-version-min"
    case "$ios_sdk" in
         # Empty SDK is okay, this might be an OS X desktop build.
         ""|iphonesimulator*)
                ;;
         # Default to iphonesimulator
         yes)
                ios_sdk=iphonesimulator
                ;;
         *)
                AC_MSG_ERROR([Only 'iphonesimulator' SDKs are valid when targeting iOS simulator.])
                ;;
    esac
    ;;
esac


if test -n "$ios_sdk"; then
   if test -z "$_IOS_TARGET"; then
      _IOS_TARGET=$_IOS_TARGET_DEFAULT
      ios_target_arg="${ios_target_arg}=${_IOS_TARGET}"
   fi
   # Ensure that xcrun knows where this SDK is.
   ios_sdk_path=`xcrun --sdk $ios_sdk --show-sdk-path 2>/dev/null`
   _ret=$?
   if test $_ret -ne 0; then
      AC_MSG_ERROR([iOS SDK '$ios_sdk' could not be found.])
   fi
   MOZ_IOS=1
   export HOST_CC=clang
   export HOST_CXX=clang++
   # Add isysroot, arch, and ios target arguments
   case "$target_cpu" in
        arm*)
                ARGS="-arch armv7"
                ;;
        *)
                # Unfortunately simulator builds need this.
                export CROSS_COMPILE=1
                ;;
   esac
   ARGS=" $ARGS -isysroot $ios_sdk_path $ios_target_arg"
   # Now find our tools
   MOZ_IOS_PATH_PROG(CC, clang, $ARGS)
   MOZ_IOS_PATH_PROG(CXX, clang++, $ARGS)
   export CPP="$CC -E"
   MOZ_IOS_PATH_PROG(AR)
   MOZ_IOS_PATH_PROG(AS, as, $ARGS)
   MOZ_IOS_PATH_PROG(OTOOL)
   MOZ_IOS_PATH_PROG(STRIP)
   export PKG_CONFIG_PATH=${ios_sdk_path}/usr/lib/pkgconfig/
fi

AC_SUBST(MOZ_IOS)
])
+0 −16
Original line number Diff line number Diff line
@@ -685,9 +685,6 @@ def split_triplet(triplet, allow_msvc=False):
    elif os.startswith('darwin'):
        canonical_kernel = 'Darwin'
        canonical_os = 'OSX'
    elif os.startswith('ios'):
        canonical_kernel = 'Darwin'
        canonical_os = 'iOS'
    elif os.startswith('dragonfly'):
        canonical_os = canonical_kernel = 'DragonFly'
    elif os.startswith('freebsd'):
@@ -920,10 +917,6 @@ def host_for_sub_configure(host):
@depends(target)
def target_for_sub_configure(target):
    target_alias = target.alias
    # old-configure does plenty of tests against $target and $target_os
    # and expects darwin for iOS, so make it happy.
    if target.os == 'iOS':
        target_alias = target_alias.replace('-ios', '-darwin')
    return '--target=%s' % target_alias


@@ -1009,15 +1002,6 @@ def target_is_darwin(target):
set_define('XP_DARWIN', target_is_darwin)


@depends(target)
def target_is_ios(target):
    if target.kernel == 'Darwin' and target.os == 'iOS':
        return True


set_define('XP_IOS', target_is_ios)


@depends(target)
def target_is_osx(target):
    if target.kernel == 'Darwin' and target.os == 'OSX':
+0 −2
Original line number Diff line number Diff line
@@ -223,7 +223,6 @@ def old_configure_options(*options):
    '--enable-gconf',
    '--enable-icf',
    '--enable-install-strip',
    '--enable-ios-target',
    '--enable-libjpeg-turbo',
    '--enable-libproxy',
    '--enable-llvm-hacks',
@@ -265,7 +264,6 @@ def old_configure_options(*options):
    '--with-doc-input-dirs',
    '--with-doc-output-dir',
    '--with-intl-api',
    '--with-ios-sdk',
    '--with-jitreport-granularity',
    '--with-macbundlename-prefix',
    '--with-nspr-cflags',
+1 −2
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ elif CONFIG['OS_TARGET'] == 'Darwin':
        '/nsprpub/pr/src/md/unix/darwin.c',
        '/nsprpub/pr/src/md/unix/os_Darwin.s',
    ]
    if not CONFIG['MOZ_IOS']:
    DEFINES['HAVE_CRT_EXTERNS_H'] = True
elif CONFIG['OS_TARGET'] == 'SunOS':
    DEFINES['HAVE_FCNTL_FILE_LOCKING'] = True
Loading