Bug 1544418 - Backed out changeset 3d0236f985f8. r=mshal
authorEric Rahm <erahm@mozilla.com>
Tue, 16 Apr 2019 18:00:57 +0000
changeset 469818 9bc9d0c8eccb
parent 469817 502d08723c19
child 469819 32cef42080b1
push id112825
push usercbrindusan@mozilla.com
push dateWed, 17 Apr 2019 15:58:37 +0000
treeherdermozilla-inbound@7bd43da7830c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1544418
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1544418 - Backed out changeset 3d0236f985f8. r=mshal Backout update that broke OSX 10.13 builds. Differential Revision: https://phabricator.services.mozilla.com/D27764
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -121,67 +121,48 @@ with only_when(target_is_osx):
 
 
     set_config('MACOSX_DEPLOYMENT_TARGET', macos_target)
     add_old_configure_assignment('MACOSX_DEPLOYMENT_TARGET', macos_target)
 
     # MacOS SDK
     # =========
 
-    js_option('--with-macos-sdk', env='MACOS_SDK_DIR', nargs=1,
-              help='Location of platform SDK to use')
-
-    @depends('--with-macos-sdk')
+    option('--with-macos-sdk', env='MACOS_SDK_DIR', nargs=1,
+           help='Location of platform SDK to use')
+
+    @depends_if('--with-macos-sdk')
     @imports(_from='os.path', _import='isdir')
-    @imports(_from='biplist', _import='readPlist')
-    @imports('subprocess')
-    @imports('which')
+    @imports(_from='plistlib', _import='readPlist')
     def macos_sdk(value):
         sdk_min_version = Version('10.11')
         sdk_max_version = Version('10.13')
 
-        sdk_path = None
-        if value:
-            sdk_path = value[0]
-        else:
-            try:
-                xcrun = which.which('xcrun')
-                args = [xcrun, '--sdk', 'macosx', '--show-sdk-path']
-                sdk_path = subprocess.check_output(args).strip()
-            except which.WhichError:
-                # On a Linux cross-compile, we don't have xcrun, so just leave
-                # the SDK unset if --with-macos-sdk isn't specified.
-                pass
-
-        if not sdk_path:
-            return
-
-        if not isdir(sdk_path):
+        if not isdir(value[0]):
             die('SDK not found in %s. When using --with-macos-sdk, you must specify a '
                 'valid SDK. SDKs are installed when the optional cross-development '
                 'tools are selected during the Xcode/Developer Tools installation.'
-                % sdk_path)
-        obj = readPlist(os.path.join(sdk_path, 'SDKSettings.plist'))
+                % value[0])
+        obj = readPlist(os.path.join(value[0], 'SDKSettings.plist'))
         if not obj:
-            die('Error parsing SDKSettings.plist in the SDK directory: %s' % sdk_path)
+            die('Error parsing SDKSettings.plist in the SDK directory: %s' % value[0])
         if 'Version' not in obj:
-            die('Error finding Version information in SDKSettings.plist from the '
-                'SDK: %s' % sdk_path)
+            die('Error finding Version information in SDKSettings.plist from the SDK: %s' % value[0])
         version = Version(obj['Version'])
         if version < sdk_min_version:
             die('SDK version "%s" is too old. Please upgrade to at least %s. '
                 'You may need to point to it using --with-macos-sdk=<path> in your '
                 'mozconfig. Various SDK versions are available from '
                 'https://github.com/phracker/MacOSX-SDKs' % (version, sdk_min_version))
         if version > sdk_max_version:
             die('SDK version "%s" is unsupported. Please downgrade to version '
                 '%s. You may need to point to it using --with-macos-sdk=<path> in '
                 'your mozconfig. Various SDK versions are available from '
                 'https://github.com/phracker/MacOSX-SDKs' % (version, sdk_max_version))
-        return sdk_path
+        return value[0]
 
     set_config('MACOS_SDK_DIR', macos_sdk)
 
     with only_when(cross_compiling):
         option('--with-macos-private-frameworks',
                env="MACOS_PRIVATE_FRAMEWORKS_DIR", nargs=1,
                help='Location of private frameworks to use')