Bug 1350822 - Remove --with-android-gnu-compiler-version. r=glandium

gcc 4.9 is the last version in Android NDK and our minimum requirement of gcc is 4.9+.  --with-android-gnu-compiler-version is unnecessary option because gcc version of Android is always 4.9.

MozReview-Commit-ID: 1sutqlvbQU5

--HG--
extra : rebase_source : 77e42aba81da5276bcddd945ea41895ce2461afa
This commit is contained in:
Makoto Kato 2017-09-20 20:34:18 +09:00
Родитель 8f49fb8f42
Коммит 08e9866266
2 изменённых файлов: 12 добавлений и 21 удалений

Просмотреть файл

@ -11,9 +11,6 @@ js_option('--with-android-ndk', nargs=1,
js_option('--with-android-toolchain', nargs=1,
help='location of the Android toolchain')
js_option('--with-android-gnu-compiler-version', nargs=1,
help='GNU compiler version to use')
@depends(target)
def min_android_version(target):
if target.cpu in ['aarch64', 'x86_64', 'mips64']:
@ -141,12 +138,11 @@ def extra_toolchain_flags(platform_dir):
return ['-idirafter',
os.path.join(platform_dir, 'usr', 'include')]
@depends(target, host, ndk, '--with-android-toolchain',
'--with-android-gnu-compiler-version')
@depends(target, host, ndk, '--with-android-toolchain')
@checking('for the Android toolchain directory', lambda x: x or 'not found')
@imports(_from='os.path', _import='isdir')
@imports(_from='mozbuild.shellutil', _import='quote')
def android_toolchain(target, host, ndk, toolchain, gnu_compiler_version):
def android_toolchain(target, host, ndk, toolchain):
if not ndk:
return
if toolchain:
@ -163,23 +159,19 @@ def android_toolchain(target, host, ndk, toolchain, gnu_compiler_version):
else:
die('Target cpu is not supported.')
toolchain_format = '%s/toolchains/%s-%s/prebuilt/%s-%s'
toolchain_format = '%s/toolchains/%s-4.9/prebuilt/%s-%s'
for version in gnu_compiler_version or ['4.9', '4.8', '4.7']:
toolchain = toolchain_format % (ndk, target_base,
host.kernel.lower(), host.cpu)
log.debug('Trying %s' % quote(toolchain))
if not isdir(toolchain) and host.cpu == 'x86_64':
toolchain = toolchain_format % (ndk, target_base, version,
host.kernel.lower(), host.cpu)
host.kernel.lower(), 'x86')
log.debug('Trying %s' % quote(toolchain))
if not isdir(toolchain) and host.cpu == 'x86_64':
toolchain = toolchain_format % (ndk, target_base, version,
host.kernel.lower(), 'x86')
log.debug('Trying %s' % quote(toolchain))
if isdir(toolchain):
return toolchain
else:
if gnu_compiler_version:
die('Your --with-android-gnu-compiler-version may be wrong')
die('You have to specify --with-android-toolchain='
'/path/to/ndk/toolchain.')
if isdir(toolchain):
return toolchain
die('You have to specify --with-android-toolchain='
'/path/to/ndk/toolchain.')
set_config('ANDROID_TOOLCHAIN', android_toolchain)

Просмотреть файл

@ -44,7 +44,6 @@ ac_add_options --with-android-sdk="$topsrcdir/android-sdk-linux"
if [ -z "$NO_NDK" ]; then
ac_add_options --with-android-ndk="$topsrcdir/android-ndk"
ac_add_options --with-android-gnu-compiler-version=4.9
fi
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}