diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk index b7510c5c688f..33e4df77596d 100644 --- a/config/makefiles/rust.mk +++ b/config/makefiles/rust.mk @@ -187,23 +187,22 @@ endif # We need to run cargo unconditionally, because cargo is the only thing that # has full visibility into how changes in Rust sources might affect the final # build. -# -# When we are building in --enable-release mode; we add an additional check to confirm -# that we are not importing any networking-related functions in rust code. This reduces -# the chance of proxy bypasses originating from rust code. force-cargo-library-build: $(REPORT_BUILD) $(call CARGO_BUILD,$(target_cargo_env_vars)) --lib $(cargo_target_flag) $(rust_features_flag) -- $(cargo_rustc_flags) + +$(RUST_LIBRARY_FILE): force-cargo-library-build +# When we are building in --enable-release mode; we add an additional check to confirm +# that we are not importing any networking-related functions in rust code. This reduces +# the chance of proxy bypasses originating from rust code. ifndef DEVELOPER_OPTIONS ifndef MOZ_DEBUG_RUST ifeq ($(OS_ARCH), Linux) - $(call py_action,check_binary,--target --networking $(RUST_LIBRARY_FILE)) + $(call py_action,check_binary,--target --networking $@) endif endif endif -$(RUST_LIBRARY_FILE): force-cargo-library-build - force-cargo-library-check: $(call CARGO_CHECK,$(target_cargo_env_vars)) --lib $(cargo_target_flag) $(rust_features_flag) else