Commit e2161f82 authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 1540788 - Make mach bootstrap choose arm target depending on the rust version. r=nalexander

Bootstrap is happy with rust version 1.32, but that version of rust
doesn't support the thumbv7neon target that we're trying to install
since bug 1539005. So install the armv7 target when rust is version
1.32.

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

--HG--
extra : moz-landing-system : lando
parent 0b3ee478
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -673,7 +673,7 @@ class BaseBootstrapper(object):
            print('Your version of Rust (%s) is new enough.' % version)
            rustup = self.which('rustup', cargo_bin)
            if rustup:
                self.ensure_rust_targets(rustup)
                self.ensure_rust_targets(rustup, version)
            return

        if version:
@@ -697,7 +697,7 @@ class BaseBootstrapper(object):
            print('Will try to install Rust.')
            self.install_rust()

    def ensure_rust_targets(self, rustup):
    def ensure_rust_targets(self, rustup, rust_version):
        """Make sure appropriate cross target libraries are installed."""
        target_list = subprocess.check_output([rustup, 'target', 'list'])
        targets = [line.split()[0] for line in target_list.splitlines()
@@ -712,7 +712,11 @@ class BaseBootstrapper(object):

        if 'mobile_android' in self.application:
            # Let's add the most common targets.
            android_targets = ('thumbv7neon-linux-androideabi',
            if rust_version < '1.33':
                arm_target = 'armv7-linux-androideabi'
            else:
                arm_target = 'thumbv7neon-linux-androideabi'
            android_targets = (arm_target,
                               'aarch64-linux-android',
                               'i686-linux-android',
                               'x86_64-linux-android', )