зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1557855 - Use a sensible default for --with-android-ndk. r=nalexander
Use the same logic as for --with-android-sdk to use the NDK downloaded by mach bootstrap by default. Differential Revision: https://phabricator.services.mozilla.com/D34251 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
177ad5806d
Коммит
ff4ab7e28f
|
@ -5,8 +5,18 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
|
||||
@depends(mozbuild_state_path, '--help')
|
||||
@imports('os')
|
||||
@imports(_from='mozboot.android', _import='NDK_VERSION')
|
||||
def default_android_ndk_root(mozbuild_state_path, _):
|
||||
path = os.path.join(mozbuild_state_path, 'android-ndk-%s' % NDK_VERSION)
|
||||
if os.path.isdir(path):
|
||||
return path
|
||||
|
||||
|
||||
js_option('--with-android-ndk', nargs=1,
|
||||
help='location where the Android NDK can be found')
|
||||
default=default_android_ndk_root,
|
||||
help='location where the Android NDK can be found{|}')
|
||||
|
||||
js_option('--with-android-toolchain', nargs=1,
|
||||
help='location of the Android toolchain')
|
||||
|
@ -52,11 +62,16 @@ add_old_configure_assignment('android_version', android_version)
|
|||
|
||||
|
||||
@depends('--with-android-ndk')
|
||||
@imports(_from='os.path', _import='isdir')
|
||||
def ndk(value):
|
||||
if not value:
|
||||
die('You must specify --with-android-ndk=/path/to/ndk when '
|
||||
'building for Android')
|
||||
return value[0]
|
||||
if value:
|
||||
if not isdir(value[0]):
|
||||
die("The path you specified with --with-android-ndk (%s) is not "
|
||||
"a directory" % value[0])
|
||||
return value[0]
|
||||
|
||||
die('You must specify --with-android-ndk=/path/to/ndk when targeting Android, '
|
||||
'or try |mach bootstrap|.')
|
||||
|
||||
|
||||
set_config('ANDROID_NDK', ndk)
|
||||
|
|
|
@ -60,8 +60,6 @@ ac_add_options --enable-application=mobile/android
|
|||
# ac_add_options --target=x86_64
|
||||
|
||||
{extra_lines}
|
||||
# With the following Android NDK:
|
||||
ac_add_options --with-android-ndk="{ndk_path}"
|
||||
<<<
|
||||
'''
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче