Skip to content

Commit

Permalink
Bug 1613649 - Explicitly opt-out of Rust's local ThinLTO for DEVELOPE…
Browse files Browse the repository at this point in the history
…R_OPTIONS builds. r=firefox-build-system-reviewers,chmanchester

By default the Rust compiler will perform a limited kind of ThinLTO on each
crate. For local builds this additional optimization is not worth the
increase in compile time.

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

--HG--
extra : moz-landing-system : lando
  • Loading branch information
michaelwoerister committed Feb 7, 2020
1 parent b58f8fa commit 785600d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/makefiles/rust.mk
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ endif

rustflags_override = $(MOZ_RUST_DEFAULT_FLAGS) $(rustflags_neon)

ifdef DEVELOPER_OPTIONS
# By default the Rust compiler will perform a limited kind of ThinLTO on each
# crate. For local builds this additional optimization is not worth the
# increase in compile time so we opt out of it.
rustflags_override += -Clto=off
endif

ifdef MOZ_USING_SCCACHE
export RUSTC_WRAPPER=$(CCACHE)
endif
Expand Down

0 comments on commit 785600d

Please sign in to comment.