Bug 1310939 - Pass $(CARGOFLAGS) to cargo invocations so cargo flags can be passed from a .mozconfig file. r?froydnj
MozReview-Commit-ID: A5GNTzS0BTM
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -895,19 +895,18 @@ ifdef ASFILES
$(ASOBJS):
$(REPORT_BUILD_VERBOSE)
$(AS) $(ASOUTOPTION)$@ $(ASFLAGS) $($(notdir $<)_FLAGS) $(AS_DASH_C_FLAG) $(_VPATH_SRCS)
endif
ifdef MOZ_RUST
ifdef RUST_LIBRARY_FILE
-ifdef MOZ_DEBUG
-cargo_build_flags =
-else
+cargo_build_flags = $(CARGOFLAGS)
+ifndef MOZ_DEBUG
cargo_build_flags = --release
endif
ifdef MOZ_CARGO_SUPPORTS_FROZEN
cargo_build_flags += --frozen
endif
cargo_build_flags += --manifest-path $(CARGO_FILE)
cargo_build_flags += --target=$(RUST_TARGET)