bug 1401647 - Fix spidermonkey mozjs / rust-bindings builds. r=nalexander
authorTed Mielczarek <ted@mielczarek.org>
Wed, 03 Jan 2018 14:51:52 -0500
changeset 449522 982eb37f52f62f4801d0fa85a89c64260ae09d3f
parent 449521 98ec3a378b91ad49a8b82138b5d2283ae6c98e66
child 449523 e3512368ff7a1d5c3c2fa395aa0aea84efa3e63e
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1401647
milestone59.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 1401647 - Fix spidermonkey mozjs / rust-bindings builds. r=nalexander The spidermonkey mozjs and rust-bindings builds run sed on $topsrcdir/.cargo/config.in to generate the cargo config they use, but they previously only replaced the @top_srcdir@ substitution. This patch makes them replace any other substitutions with an empty value to add a bit of future-proofing. MozReview-Commit-ID: 1DzP9vXxHMD
.cargo/config.in
taskcluster/scripts/builder/build-sm-mozjs-crate.sh
taskcluster/scripts/builder/build-sm-rust-bindings.sh
--- a/.cargo/config.in
+++ b/.cargo/config.in
@@ -1,8 +1,13 @@
+# Note: if you add more configure substitutions here with required values
+# you will also need to fix the sed commands in:
+# taskcluster/scripts/builder/build-sm-mozjs-crate.sh
+# taskcluster/scripts/builder/build-sm-rust-bindings.sh
+
 [source.crates-io]
 registry = 'https://github.com/rust-lang/crates.io-index'
 replace-with = 'vendored-sources'
 
 [source."https://github.com/gankro/serde"]
 git = "https://github.com/gankro/serde"
 branch = "deserialize_from_enums3"
 replace-with = "vendored-sources"
--- a/taskcluster/scripts/builder/build-sm-mozjs-crate.sh
+++ b/taskcluster/scripts/builder/build-sm-mozjs-crate.sh
@@ -2,17 +2,17 @@
 
 set -xe
 
 source $(dirname $0)/sm-tooltool-config.sh
 
 # Ensure that we have a .config/cargo that points us to our vendored crates
 # rather than to crates.io.
 cd "$SRCDIR/.cargo"
-sed -e "s|@top_srcdir@|$SRCDIR|" < config.in | tee config
+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
 
 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
@@ -2,17 +2,17 @@
 
 set -xe
 
 source $(dirname $0)/sm-tooltool-config.sh
 
 # Ensure that we have a .config/cargo that points us to our vendored crates
 # rather than to crates.io.
 cd "$SRCDIR/.cargo"
-sed -e "s|@top_srcdir@|$SRCDIR|" < config.in | tee config
+sed -e "s|@top_srcdir@|$SRCDIR|" -e 's|@[^@]*@||g' < config.in > config
 
 cd "$SRCDIR/js/rust"
 
 # Enable backtraces if we panic.
 export RUST_BACKTRACE=1
 
 cargo test --verbose --frozen --features debugmozjs
 cargo test --verbose --frozen