Bug 1552080 - Don't clobber library features with test features in the make backend. r=chmanchester
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 28 May 2019 21:05:03 +0000
changeset 475984 a4cb3416b991dc3f13a29b71dc9f989cce3aaa17
parent 475983 fdb54462e8c743b7ef42b0ad8710a61d49d361b9
child 475985 4d71f6b28394776ca4519e8dbf10133cc266ca26
push id36080
push usernerli@mozilla.com
push dateWed, 29 May 2019 09:48:47 +0000
treeherdermozilla-central@d78adc84bde8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1552080
milestone69.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 1552080 - Don't clobber library features with test features in the make backend. r=chmanchester We weren't honoring the case where the library features differ from the tests features (situation which my previous patch does). We were incorrectly overriding `rust_feature_flags`, which of course ended up with a working rusttests with my patches, but a bunch of negative leaks :) Name the test features differently so that they don't affect the regular library features. Differential Revision: https://phabricator.services.mozilla.com/D32777
config/makefiles/rust.mk
--- a/config/makefiles/rust.mk
+++ b/config/makefiles/rust.mk
@@ -256,24 +256,24 @@ force-cargo-library-check:
 	@true
 endif # RUST_LIBRARY_FILE
 
 ifdef RUST_TESTS
 
 rust_test_options := $(foreach test,$(RUST_TESTS),-p $(test))
 
 ifdef RUST_TEST_FEATURES
-rust_features_flag := --features '$(RUST_TEST_FEATURES)'
+rust_test_features_flag := --features '$(RUST_TEST_FEATURES)'
 endif
 
 # Don't stop at the first failure. We want to list all failures together.
 rust_test_flag := --no-fail-fast
 
 force-cargo-test-run:
-	$(call RUN_CARGO,test $(cargo_target_flag) $(rust_test_flag) $(rust_test_options) $(rust_features_flag))
+	$(call RUN_CARGO,test $(cargo_target_flag) $(rust_test_flag) $(rust_test_options) $(rust_test_features_flag))
 
 endif
 
 ifdef HOST_RUST_LIBRARY_FILE
 
 ifdef HOST_RUST_LIBRARY_FEATURES
 host_rust_features_flag := --features '$(HOST_RUST_LIBRARY_FEATURES)'
 endif