Bug 1283898 - Add tooltool rust to path for js hazard jobs. r?gps
Tasks calling these generally use tooltool and the hazard
manifest to provide toolchains, but the setup job doesn't
they don't use a mozconfig to configure paths, and the analysis
job uses a different TOOLTOOL_DIR.
The build calls configure, which defaults to --enable-rust,
so we need to add the correct rust toolchain path to the
environment like we do for C++.
MozReview-Commit-ID: gFnZ0SK1f7
--- a/browser/config/mozconfigs/linux64/hazards
+++ b/browser/config/mozconfigs/linux64/hazards
@@ -24,12 +24,17 @@ ac_add_options --enable-tests
ac_add_options --enable-optimize
ac_add_options --with-compiler-wrapper=$TOOLTOOL_DIR/sixgill/usr/libexec/sixgill/scripts/wrap_gcc/basecc
ac_add_options --without-ccache
CFLAGS="$CFLAGS -Wno-attributes"
CPPFLAGS="$CPPFLAGS -Wno-attributes"
CXXFLAGS="$CXXFLAGS -Wno-attributes"
+# Override rust toolchain paths. In this build they're in $TOOLTOOL_DIR
+# instead of $topsrcdir as referenced by mozconfig.common.
+RUSTC=$TOOLTOOL_DIR/rustc/bin/rustc
+CARGO=$TOOLTOOL_DIR/rustc/bin/cargo
+
export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
. $topsrcdir/build/unix/mozconfig.gtk
. "$topsrcdir/build/mozconfig.common.override"
--- a/taskcluster/scripts/builder/hazard-analysis.sh
+++ b/taskcluster/scripts/builder/hazard-analysis.sh
@@ -5,16 +5,18 @@
[ -n "$GECKO_DIR" ]
HAZARD_SHELL_OBJDIR=$WORKSPACE/obj-haz-shell
JS_SRCDIR=$GECKO_DIR/js/src
ANALYSIS_SRCDIR=$JS_SRCDIR/devtools/rootAnalysis
export CC="$TOOLTOOL_DIR/gcc/bin/gcc"
export CXX="$TOOLTOOL_DIR/gcc/bin/g++"
+export RUSTC="$TOOLTOOL_DIR/rustc/bin/rustc"
+export CARGO="$TOOLTOOL_DIR/rustc/bin/cargo"
PYTHON=python2.7
if ! which $PYTHON; then
PYTHON=python
fi
function check_commit_msg () {