Bug 1321691 - Suggest boostrap if configure fails to find rust. r?chmanchester draft
authorRalph Giles <giles@mozilla.com>
Thu, 01 Dec 2016 17:01:55 -0800
changeset 446862 2e2d56af10afb833996ab056f4a03bc4873cdf63
parent 446622 0f555be51152480ced5cb79c56b34b51066f3048
child 446867 641ee9087267f0571a2dcbb7e8d6087027ffa46b
push id37906
push userbmo:giles@thaumas.net
push dateFri, 02 Dec 2016 01:05:03 +0000
reviewerschmanchester
bugs1321691
milestone53.0a1
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
build/moz.configure/rust.configure
--- 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:
             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/
             '''))
         version = rustc_info.version
         min_version = Version('1.10')
         if version < min_version:
             die(dedent('''\
             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)
 
 @template
 def rust_triple_alias(host_or_target):
     """Template defining the alias used for rustc's --target flag.