Bug 1283898 - Add tooltool rust to path for js hazard jobs. r?gps draft
authorRalph Giles <giles@mozilla.com>
Tue, 13 Dec 2016 10:56:52 -0800
changeset 449323 997fe2e9071f9dbc1067020c0cd4cec165741dff
parent 449322 b499b2ecacda66941865cc402854d98b973e1f2c
child 449324 ac53ba5a1a3dc812abbc1c31d28bf789a2e2c6b0
push id38543
push userbmo:giles@thaumas.net
push dateTue, 13 Dec 2016 23:13:40 +0000
reviewersgps
bugs1283898
milestone53.0a1
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
browser/config/mozconfigs/linux64/hazards
taskcluster/scripts/builder/hazard-analysis.sh
--- 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 () {