Bug 1623085 - Only explicitly set number of Rust codegen-units for target artifacts. r=froydnj

Differential Revision: https://phabricator.services.mozilla.com/D67162

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Michael Woerister 2020-03-17 16:47:52 +00:00
parent 9f2ec488bb
commit 5327bb2166
2 changed files with 7 additions and 1 deletions

View File

@ -63,7 +63,6 @@ opt-level = 2
rpath = false
debug-assertions = false
panic = "abort"
codegen-units = 1
[patch.crates-io]
libudev-sys = { path = "dom/webauthn/libudev-sys" }

View File

@ -188,6 +188,13 @@ $(target_rust_nonltoable): RUSTFLAGS:=$(rustflags_override) $(rustflags_sancov)
TARGET_RECIPES := $(target_rust_ltoable) $(target_rust_nonltoable)
# If this is a release build we want rustc to generate one codegen unit per
# crate. This results in better optimization and less code duplication at the
# cost of longer compile times.
ifndef DEVELOPER_OPTIONS
$(TARGET_RECIPES): RUSTFLAGS += -C codegen-units=1
endif
HOST_RECIPES := \
$(foreach a,library program,$(foreach b,build check,force-cargo-host-$(a)-$(b)))