From 5523ac828b459f945e1243677c513130321b7ad1 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 13 Sep 2018 12:05:50 +0200 Subject: [PATCH] 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. --HG-- extra : rebase_source : 06704eb326aad36a870586694a99964ad7a4dbfa extra : histedit_source : 1502d976bc12a3eed17efaaf5dd2d4f46d0b00d5 --- config/rules.mk | 7 +++++++ js/src/make-source-package.sh | 3 +++ 2 files changed, 10 insertions(+) diff --git a/config/rules.mk b/config/rules.mk index 8f16167d3a2a..33d6e137284d 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -842,7 +842,14 @@ 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 diff --git a/js/src/make-source-package.sh b/js/src/make-source-package.sh index 2280e307e66d..9c307f7f9417 100755 --- a/js/src/make-source-package.sh +++ b/js/src/make-source-package.sh @@ -123,6 +123,9 @@ case $cmd in 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 \