Bug 1490948: Adjustments for the source package; r=chmanchester
authorBenjamin Bouvier <benj@benj.me>
Thu, 13 Sep 2018 12:05:50 +0200
changeset 438702 8c10309414ae573c04b690bc755859bfe8b99512
parent 438701 e58d578f13d990ac2064d38692b2440bc96f9e2f
child 438703 4d9500ca5761edd678a109b6b5a4ac3f4aa5edb0
push id70086
push usertoros@mozilla.com
push dateFri, 28 Sep 2018 15:41:28 +0000
treeherderautoland@dbe2506cadd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1490948
milestone64.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 1490948: Adjustments for the source package; r=chmanchester - Embed vendored Rust dependencies into the source package. - Don't use --freeze with Cargo in JS standalone builds: since all the Rust dependencies are vendored in, it won't trigger an update of the toplevel Cargo.lock file for a standalone build in the non-package build case.
config/rules.mk
js/src/make-source-package.sh
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -837,17 +837,24 @@ endif
 cargo_host_flag := --target=$(RUST_HOST_TARGET)
 cargo_target_flag := --target=$(RUST_TARGET)
 
 # Permit users to pass flags to cargo from their mozconfigs (e.g. --color=always).
 cargo_build_flags = $(CARGOFLAGS)
 ifndef MOZ_DEBUG_RUST
 cargo_build_flags += --release
 endif
+
+# The Spidermonkey library can be built from a package tarball outside the
+# tree, so we want to let Cargo create lock files in this case. When built
+# within a tree, the Rust dependencies have been vendored in so Cargo won't
+# touch the lock file.
+ifndef JS_STANDALONE
 cargo_build_flags += --frozen
+endif
 
 cargo_build_flags += --manifest-path $(CARGO_FILE)
 ifdef BUILD_VERBOSE_LOG
 cargo_build_flags += -vv
 else
 ifdef MOZ_AUTOMATION
 cargo_build_flags += -vv
 endif # MOZ_AUTOMATION
--- a/js/src/make-source-package.sh
+++ b/js/src/make-source-package.sh
@@ -118,16 +118,19 @@ case $cmd in
 
     cp -pPR \
         ${TOPSRCDIR}/python \
         ${tgtpath}
     ${MKDIR} -p ${tgtpath}/third_party
     cp -pPR \
         ${TOPSRCDIR}/third_party/python \
         ${tgtpath}/third_party
+    cp -pPR \
+        ${TOPSRCDIR}/third_party/rust \
+        ${tgtpath}/third_party
     ${MKDIR} -p ${tgtpath}/dom/bindings
     cp -pPR \
         ${TOPSRCDIR}/dom/bindings/mozwebidlcodegen \
         ${tgtpath}/dom/bindings
     ${MKDIR} -p ${tgtpath}/media/webrtc/trunk/tools
     cp -pPR \
         ${TOPSRCDIR}/third_party/python/gyp \
         ${tgtpath}/third_party/python