Bug 1477487 - Part 3: Make |mach bootstrap| for Android install Rust toolchains. r=agi

Differential Revision: https://phabricator.services.mozilla.com/D16139

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nick Alexander 2019-01-17 21:31:12 +00:00
parent aa8a7a854c
commit 3036f1ed4d
2 changed files with 12 additions and 2 deletions

View File

@ -53,10 +53,10 @@ ac_add_options --enable-application=mobile/android
# Targeting the following architecture. Ensure exactly one --target is uncommented!
# For regular phones:
ac_add_options --target=arm-linux-androideabi
# For newer phones.
# ac_add_options --target=aarch64-linux-android
# For x86 emulators (and x86 devices, which are uncommon):
# ac_add_options --target=i686-linux-android
# For newer phones.
# ac_add_options --target=aarch64-linux-android
# For x86_64 emulators (and x86_64 devices, which are even less common):
# ac_add_options --target=x86_64-linux-android

View File

@ -690,6 +690,16 @@ class BaseBootstrapper(object):
if rust.platform() == win64 and win32 not in targets:
subprocess.check_call([rustup, 'target', 'add', win32])
if 'mobile_android' in self.application:
# Let's add the most common targets.
android_targets = ('armv7-linux-androideabi',
'aarch64-linux-android',
'i686-linux-android',
'x86_64-linux-android', )
for target in android_targets:
if target not in targets:
subprocess.check_call([rustup, 'target', 'add', target])
def upgrade_rust(self, rustup):
"""Upgrade Rust.