Bug 1321691 - Suggest boostrap if configure fails to find rust. r=chmanchester
authorRalph Giles <giles@mozilla.com>
Thu, 01 Dec 2016 17:01:55 -0800
changeset 325152 0a1c6a0b270dc6b13b819731d1eac28a02b36a46
parent 325151 eeb34d6bc82cbc44e9dec0005faa6dedb3d1b318
child 325153 02aa6ad54a6ecd18d1e9d5f219f12ac74a8db9e6
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
Bug 1321691 - Suggest boostrap if configure fails to find rust. r=chmanchester Now that `./mach boostrap` installs rustup, suggest this if configure fails to find the toolchain when building with --enable-rust. Also point out https://rustup.rs/ for those who want more control. MozReview-Commit-ID: 8JIbERfz12f
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -51,26 +51,35 @@ set_config('MOZ_CARGO_SUPPORTS_FROZEN', 
 @imports(_from='textwrap', _import='dedent')
 def rust_compiler(value, rustc, rustc_info):
     if value:
         if not rustc:
             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/
         version = rustc_info.version
         min_version = Version('1.10')
         if version < min_version:
             Rust compiler {} is too old.
             To compile Rust language sources please install at least
             version {} of the 'rustc' toolchain and make sure it is
             first in your path.
             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, min_version)))
         return True
 set_config('MOZ_RUST', rust_compiler)
 def rust_triple_alias(host_or_target):
     """Template defining the alias used for rustc's --target flag.