зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 5 changesets (bug 1528314, bug 1560044) for build bustages on a CLOSED TREE
Backed out changeset 4a544cd4b035 (bug 1528314) Backed out changeset 91919cdf9159 (bug 1528314) Backed out changeset 1271940e91e8 (bug 1560044) Backed out changeset a5bbaa8c1001 (bug 1560044) Backed out changeset 7ae0d606f1c6 (bug 1560044)
This commit is contained in:
Родитель
0c7ee5ce30
Коммит
c92947ecc6
|
@ -24,10 +24,6 @@ def java_search_paths(host, path):
|
|||
if host.os == 'WINNT':
|
||||
for x in get_registry_values(r'HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.8\JavaHome', get_32_and_64_bit=True):
|
||||
return [os.path.join(x[0], 'bin')]
|
||||
if host.os == 'OSX':
|
||||
home = check_cmd_output('/usr/libexec/java_home', '-v', '1.8', onerror=lambda: '').rstrip()
|
||||
if home:
|
||||
return [os.path.join(home, 'bin')]
|
||||
return [environ.get('PATH')]
|
||||
|
||||
# Finds the given java tool, failing with a custom error message if we can't
|
||||
|
|
|
@ -123,47 +123,29 @@ with only_when(target_is_osx):
|
|||
set_config('MACOSX_DEPLOYMENT_TARGET', macos_target)
|
||||
add_old_configure_assignment('MACOSX_DEPLOYMENT_TARGET', macos_target)
|
||||
|
||||
|
||||
@depends(host)
|
||||
def host_is_osx(host):
|
||||
if host.os == 'OSX':
|
||||
return True
|
||||
|
||||
|
||||
with only_when(host_is_osx | target_is_osx):
|
||||
# MacOS SDK
|
||||
# =========
|
||||
|
||||
js_option('--with-macos-sdk', env='MACOS_SDK_DIR', nargs=1,
|
||||
help='Location of platform SDK to use')
|
||||
|
||||
@depends('--with-macos-sdk', host)
|
||||
@depends_if('--with-macos-sdk')
|
||||
@imports(_from='os.path', _import='isdir')
|
||||
@imports(_from='biplist', _import='readPlist')
|
||||
def macos_sdk(sdk, host):
|
||||
def macos_sdk(value):
|
||||
sdk_min_version = Version('10.11')
|
||||
sdk_max_version = Version('10.14')
|
||||
|
||||
if sdk:
|
||||
sdk = sdk[0]
|
||||
elif host.os == 'OSX':
|
||||
sdk = check_cmd_output('xcrun', '--show-sdk-path', onerror=lambda: '').rstrip()
|
||||
if not sdk:
|
||||
die('Could not find the macOS SDK. Please use --with-macos-sdk to give '
|
||||
'the path to a macOS SDK.')
|
||||
else:
|
||||
die('Need a macOS SDK when targeting macOS. Please use --with-macos-sdk '
|
||||
'to give the path to a macOS SDK.')
|
||||
|
||||
if not isdir(sdk):
|
||||
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)
|
||||
obj = readPlist(os.path.join(sdk, '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)
|
||||
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)
|
||||
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. '
|
||||
|
@ -175,12 +157,10 @@ with only_when(host_is_osx | target_is_osx):
|
|||
'%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
|
||||
return value[0]
|
||||
|
||||
set_config('MACOS_SDK_DIR', macos_sdk)
|
||||
|
||||
|
||||
with only_when(target_is_osx):
|
||||
with only_when(cross_compiling):
|
||||
option('--with-macos-private-frameworks',
|
||||
env="MACOS_PRIVATE_FRAMEWORKS_DIR", nargs=1,
|
||||
|
@ -204,49 +184,49 @@ with only_when(target_is_osx):
|
|||
set_config('MACOS_PRIVATE_FRAMEWORKS_DIR', macos_private_frameworks)
|
||||
|
||||
|
||||
with only_when(host_is_osx):
|
||||
# Xcode state
|
||||
# ===========
|
||||
js_option('--disable-xcode-checks',
|
||||
help='Do not check that Xcode is installed and properly configured')
|
||||
# Xcode state
|
||||
# ===========
|
||||
|
||||
js_option('--disable-xcode-checks',
|
||||
help='Do not check that Xcode is installed and properly configured')
|
||||
|
||||
|
||||
@depends(host, '--disable-xcode-checks')
|
||||
def xcode_path(host, xcode_checks):
|
||||
if host.kernel != 'Darwin' or not xcode_checks:
|
||||
return
|
||||
@depends(host, '--disable-xcode-checks')
|
||||
def xcode_path(host, xcode_checks):
|
||||
if host.kernel != 'Darwin' or not xcode_checks:
|
||||
return
|
||||
|
||||
# xcode-select -p prints the path to the installed Xcode. It
|
||||
# should exit 0 and return non-empty result if Xcode is installed.
|
||||
# xcode-select -p prints the path to the installed Xcode. It
|
||||
# should exit 0 and return non-empty result if Xcode is installed.
|
||||
|
||||
def bad_xcode_select():
|
||||
die('Could not find installed Xcode; install Xcode from the App '
|
||||
'Store, run it once to perform initial configuration, and then '
|
||||
'try again; in the rare case you wish to build without Xcode '
|
||||
'installed, add the --disable-xcode-checks configure flag')
|
||||
def bad_xcode_select():
|
||||
die('Could not find installed Xcode; install Xcode from the App '
|
||||
'Store, run it once to perform initial configuration, and then '
|
||||
'try again; in the rare case you wish to build without Xcode '
|
||||
'installed, add the --disable-xcode-checks configure flag')
|
||||
|
||||
xcode_path = check_cmd_output('xcode-select', '--print-path',
|
||||
onerror=bad_xcode_select).strip()
|
||||
xcode_path = check_cmd_output('xcode-select', '--print-path',
|
||||
onerror=bad_xcode_select).strip()
|
||||
|
||||
if not xcode_path:
|
||||
bad_xcode_select()
|
||||
if not xcode_path:
|
||||
bad_xcode_select()
|
||||
|
||||
# Now look for the Command Line Tools.
|
||||
def no_cltools():
|
||||
die('Could not find installed Xcode Command Line Tools; '
|
||||
'run `xcode-select --install` and follow the instructions '
|
||||
'to install them then try again; if you wish to build without '
|
||||
'Xcode Command Line Tools installed, '
|
||||
'add the --disable-xcode-checks configure flag')
|
||||
# Now look for the Command Line Tools.
|
||||
def no_cltools():
|
||||
die('Could not find installed Xcode Command Line Tools; '
|
||||
'run `xcode-select --install` and follow the instructions '
|
||||
'to install them then try again; if you wish to build without '
|
||||
'Xcode Command Line Tools installed, '
|
||||
'add the --disable-xcode-checks configure flag')
|
||||
|
||||
check_cmd_output('pkgutil', '--pkg-info',
|
||||
'com.apple.pkg.CLTools_Executables',
|
||||
onerror=no_cltools)
|
||||
check_cmd_output('pkgutil', '--pkg-info',
|
||||
'com.apple.pkg.CLTools_Executables',
|
||||
onerror=no_cltools)
|
||||
|
||||
return xcode_path
|
||||
return xcode_path
|
||||
|
||||
|
||||
set_config('XCODE_PATH', xcode_path)
|
||||
set_config('XCODE_PATH', xcode_path)
|
||||
|
||||
|
||||
# Compiler wrappers
|
||||
|
|
|
@ -292,10 +292,15 @@ def ensure_android_packages(sdkmanager_tool, packages=None, no_interactive=False
|
|||
print(output)
|
||||
|
||||
|
||||
def suggest_mozconfig(os_name, artifact_mode=False):
|
||||
def suggest_mozconfig(os_name, artifact_mode=False, java_bin_path=None):
|
||||
moz_state_dir, sdk_path, ndk_path = get_paths(os_name)
|
||||
|
||||
extra_lines = []
|
||||
if java_bin_path:
|
||||
extra_lines += [
|
||||
'# With the following java:',
|
||||
'ac_add_options --with-java-bin-path="{}"'.format(java_bin_path),
|
||||
]
|
||||
if extra_lines:
|
||||
extra_lines.append('')
|
||||
|
||||
|
|
|
@ -380,7 +380,9 @@ class OSXBootstrapper(BaseBootstrapper):
|
|||
|
||||
def suggest_homebrew_mobile_android_mozconfig(self, artifact_mode=False):
|
||||
from mozboot import android
|
||||
android.suggest_mozconfig('macosx', artifact_mode=artifact_mode)
|
||||
# Path to java from the homebrew/cask-versions/adoptopenjdk8 cask.
|
||||
android.suggest_mozconfig('macosx', artifact_mode=artifact_mode,
|
||||
java_bin_path=JAVA_PATH)
|
||||
|
||||
def _ensure_macports_packages(self, packages):
|
||||
self.port = self.which('port')
|
||||
|
|
Загрузка…
Ссылка в новой задаче