Bug 1602651 - Explicitly point to rustfmt during spidermonkey rust build. r=glandium
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 13 Dec 2019 07:34:35 +0000
changeset 506884 419f2483e06cb48b7d59007daa092628273ad88f
parent 506883 7457f272360e58ddf4bb3699fc494efc955b13a9
child 506885 3211056a72a7ce3262010fc563c5ab8139f6ef63
push id36913
push useropoprus@mozilla.com
push dateFri, 13 Dec 2019 16:53:24 +0000
treeherdermozilla-central@1ed684598bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1602651
milestone73.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 1602651 - Explicitly point to rustfmt during spidermonkey rust build. r=glandium We build bindgen without the `which` feeature, which means it won't try to look for `rustfmt` in $PATH. So point at it explicitly so that the bindings are properly formatted. We do the same for regular Gecko builds in `build/mozconfig.rust`. Differential Revision: https://phabricator.services.mozilla.com/D56957
taskcluster/scripts/builder/build-sm-mozjs-crate.sh
taskcluster/scripts/builder/build-sm-rust-bindings.sh
--- a/taskcluster/scripts/builder/build-sm-mozjs-crate.sh
+++ b/taskcluster/scripts/builder/build-sm-mozjs-crate.sh
@@ -4,13 +4,14 @@ set -xe
 
 source $(dirname $0)/sm-tooltool-config.sh
 
 cd "$SRCDIR/js/src"
 
 cp $SRCDIR/.cargo/config.in $SRCDIR/.cargo/config
 
 export PATH="$PATH:$MOZ_FETCHES_DIR/cargo/bin:$MOZ_FETCHES_DIR/rustc/bin"
+export RUSTFMT="$MOZ_FETCHES_DIR/rustc/bin/rustfmt"
 export RUST_BACKTRACE=1
 export AUTOMATION=1
 
 cargo build --verbose --frozen --features debugmozjs
 cargo build --verbose --frozen
--- a/taskcluster/scripts/builder/build-sm-rust-bindings.sh
+++ b/taskcluster/scripts/builder/build-sm-rust-bindings.sh
@@ -3,14 +3,15 @@
 set -xe
 
 source $(dirname $0)/sm-tooltool-config.sh
 
 cd "$SRCDIR/js/rust"
 
 cp $SRCDIR/.cargo/config.in $SRCDIR/.cargo/config
 
+export RUSTFMT="$MOZ_FETCHES_DIR/rustc/bin/rustfmt"
 export LD_LIBRARY_PATH="$MOZ_FETCHES_DIR/gcc/lib64"
 # Enable backtraces if we panic.
 export RUST_BACKTRACE=1
 
 cargo test --verbose --frozen --features debugmozjs
 cargo test --verbose --frozen