Bug 1542862 - Eagerly fail when building Android on OSX with rust 1.33 and point to the bug/workaround. r=glandium
authorBobby Holley <bobbyholley@gmail.com>
Tue, 09 Apr 2019 18:40:44 +0000
changeset 468618 ac23ad5ef0c18d7bf5b55fd9d07cfd1c0da33033
parent 468617 1c24cd92ef54fcfbcc8cf32ee194ae6009d7809d
child 468619 578c94538897c59349de77ee3c2da4252198a371
push id35843
push usernbeleuzu@mozilla.com
push dateTue, 09 Apr 2019 22:08:13 +0000
treeherdermozilla-central@a31032a16330 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1542862
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1542862 - Eagerly fail when building Android on OSX with rust 1.33 and point to the bug/workaround. r=glandium Differential Revision: https://phabricator.services.mozilla.com/D26589
build/moz.configure/rust.configure
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -49,19 +49,19 @@ def cargo_info(cargo):
             die('Could not determine cargo version from output: %s', out)
         version = m.group(1)
 
     return namespace(
         version=Version(version),
     )
 
 
-@depends(rustc_info, cargo_info, build_project)
+@depends(rustc_info, cargo_info, build_project, host, target)
 @imports(_from='textwrap', _import='dedent')
-def rust_compiler(rustc_info, cargo_info, build_project):
+def rust_compiler(rustc_info, cargo_info, build_project, host, target):
     if not rustc_info:
         die(dedent('''\
         Rust compiler not found.
         To compile rust language sources, you must have 'rustc' in your path.
         See https://www.rust-lang.org/ for more information.
 
         You can install rust by running './mach bootstrap'
         or by directly running the installer from https://rustup.rs/
@@ -84,16 +84,24 @@ def rust_compiler(rustc_info, cargo_info
 
         You can verify this by typing 'rustc --version'.
 
         If you have the 'rustup' tool installed you can upgrade
         to the latest release by typing 'rustup update'. The
         installer is available from https://rustup.rs/
         '''.format(version, rustc_min_version)))
 
+    if host.os == 'OSX' and target.os == 'Android' and version >= '1.33.0':
+        die(dedent('''\
+        Cross-Compiling Android on OSX with Rust 1.33 is currently broken, see bug 1536486.
+
+        As a workaround: invoke 'rustup override set 1.32.0' in your source directory, then
+        rerun './mach bootstrap' to pick up the required toolchains.
+        '''))
+
     if not cargo_info:
         die(dedent('''\
         Cargo package manager not found.
         To compile Rust language sources, you must have 'cargo' in your path.
         See https://www.rust-lang.org/ for more information.
 
         You can install cargo by running './mach bootstrap'
         or by directly running the installer from https://rustup.rs/