mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1266620 - Move MACOSX_DEPLOYMENT_TARGET to moz.configure. r=chmanchester
This commit is contained in:
parent
79133e3755
commit
e720762c60
@ -202,7 +202,6 @@ def old_configure_options(*options):
|
||||
'--enable-libproxy',
|
||||
'--enable-llvm-hacks',
|
||||
'--enable-logrefcnt',
|
||||
'--enable-macos-target',
|
||||
'--enable-maintenance-service',
|
||||
'--enable-media-navigator',
|
||||
'--enable-memory-sanitizer',
|
||||
|
@ -70,6 +70,29 @@ def android_ndk_include(compile_env, build_project, _):
|
||||
include(android_ndk_include)
|
||||
|
||||
|
||||
# MacOS deployment target version
|
||||
# ==============================================================
|
||||
# This needs to happen before any compilation test is done.
|
||||
|
||||
option('--enable-macos-target', env='MACOSX_DEPLOYMENT_TARGET', nargs=1,
|
||||
default='10.6', help='Set the minimum MacOS version needed at runtime')
|
||||
|
||||
@depends('--enable-macos-target', target)
|
||||
@imports(_from='os', _import='environ')
|
||||
def macos_target(value, target):
|
||||
if value and target.os == 'OSX':
|
||||
# Ensure every compiler process we spawn uses this value.
|
||||
environ['MACOSX_DEPLOYMENT_TARGET'] = value[0]
|
||||
return value[0]
|
||||
if value and value.origin != 'default':
|
||||
die('--enable-macos-target cannot be used when targeting %s',
|
||||
target.os)
|
||||
|
||||
|
||||
set_config('MACOSX_DEPLOYMENT_TARGET', macos_target)
|
||||
add_old_configure_assignment('MACOSX_DEPLOYMENT_TARGET', macos_target)
|
||||
|
||||
|
||||
# Compiler wrappers
|
||||
# ==============================================================
|
||||
# Normally, we'd use js_option and automatically have those variables
|
||||
|
@ -406,32 +406,6 @@ dnl The universal machinery sets UNIVERSAL_BINARY to inform packager.mk
|
||||
dnl that a universal binary is being produced.
|
||||
AC_SUBST(UNIVERSAL_BINARY)
|
||||
|
||||
dnl ========================================================
|
||||
dnl Check for MacOS deployment target version
|
||||
dnl ========================================================
|
||||
|
||||
MOZ_ARG_ENABLE_STRING(macos-target,
|
||||
[ --enable-macos-target=VER (default=10.6)
|
||||
Set the minimum MacOS version needed at runtime],
|
||||
[_MACOSX_DEPLOYMENT_TARGET=$enableval])
|
||||
|
||||
if test "$target_cpu" != "arm"; then
|
||||
case "$target" in
|
||||
*-darwin*)
|
||||
if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
|
||||
dnl Use the specified value
|
||||
export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
|
||||
else
|
||||
dnl No value specified on the command line or in the environment,
|
||||
dnl use architecture minimum.
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.6
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Mac OS X SDK support
|
||||
dnl ========================================================
|
||||
|
@ -269,30 +269,6 @@ MOZ_TOOL_VARIABLES
|
||||
|
||||
MOZ_RUST_SUPPORT
|
||||
|
||||
dnl ========================================================
|
||||
dnl Check for MacOS deployment target version
|
||||
dnl ========================================================
|
||||
|
||||
MOZ_ARG_ENABLE_STRING(macos-target,
|
||||
[ --enable-macos-target=VER (default=10.6)
|
||||
Set the minimum MacOS version needed at runtime],
|
||||
[_MACOSX_DEPLOYMENT_TARGET=$enableval])
|
||||
|
||||
case "$target" in
|
||||
*-darwin*)
|
||||
if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
|
||||
dnl Use the specified value
|
||||
export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
|
||||
else
|
||||
dnl No value specified on the command line or in the environment,
|
||||
dnl use architecture minimum.
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.6
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
|
||||
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CXXCPP
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user