Bug 1455795 - Remove the AUTOMATION option from mozjs_sys's build.rs. r=sfink
authorRobin Templeton <robin@igalia.com>
Tue, 24 Apr 2018 18:04:00 -0400
changeset 469280 49735826de0140497a6ff73c192b79f83258bf79
parent 469279 92824bef6153947f1be1f9c00a37f5a8eb2c6f59
child 469281 06cba34e7186dcf1737eac2d84ba5bb2c50dae63
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1455795, 1294157
milestone61.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 1455795 - Remove the AUTOMATION option from mozjs_sys's build.rs. r=sfink This option shouldn't be used for local builds (see bug 1294157). Set the option from the crate's taskcluster script instead, so that it's used only for automated builds.
js/src/build.rs
taskcluster/scripts/builder/build-sm-mozjs-crate.sh
--- a/js/src/build.rs
+++ b/js/src/build.rs
@@ -26,21 +26,24 @@ fn main() {
     let mut cmd = Command::new(&python);
     cmd.args(&["./devtools/automation/autospider.py",
                // Only build SpiderMonkey, don't run all the tests.
                "--build-only",
                // Disable Mozilla's jemalloc; Rust has its own jemalloc that we
                // can swap in instead and everything using a single malloc is
                // good.
                "--no-jemalloc",
+               // Don't try to clobber the output directory. Without
+               // this option, the build will fail because the directory
+               // already exists but wasn't created by autospider.
+               "--dep",
                "--objdir", &out_dir,
                variant])
         .env("SOURCE", &js_src)
         .env("PWD", &js_src)
-        .env("AUTOMATION", "1")
         .stdout(Stdio::inherit())
         .stderr(Stdio::inherit());
     println!("Running command: {:?}", cmd);
     let result = cmd
         .status()
         .expect("Should spawn autospider OK");
     assert!(result.success(), "autospider should exit OK");
 
--- a/taskcluster/scripts/builder/build-sm-mozjs-crate.sh
+++ b/taskcluster/scripts/builder/build-sm-mozjs-crate.sh
@@ -8,11 +8,12 @@ source $(dirname $0)/sm-tooltool-config.
 # rather than to crates.io.
 cd "$SRCDIR/.cargo"
 sed -e "s|@top_srcdir@|$SRCDIR|" -e 's|@[^@]*@||g' < config.in > config
 
 cd "$SRCDIR/js/src"
 
 export PATH="$PATH:$TOOLTOOL_CHECKOUT/cargo/bin:$TOOLTOOL_CHECKOUT/rustc/bin"
 export RUST_BACKTRACE=1
+export AUTOMATION=1
 
 cargo build --verbose --frozen --features debugmozjs
 cargo build --verbose --frozen