mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
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:
parent
9f2ec488bb
commit
5327bb2166
@ -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" }
|
||||
|
@ -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)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user