mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
Bug 1595805 - Disable LTO on macosx fuzzy builds r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D52688 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
71124aa4f2
commit
8088fe5c1d
@ -41,16 +41,26 @@ cargo_build_flags += --color=always
|
||||
endif
|
||||
endif
|
||||
|
||||
rustflags_lto = -Clto
|
||||
# Disable LTO when linking gkrust_gtest.
|
||||
ifneq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
|
||||
rustflags_lto =
|
||||
endif
|
||||
# Disable LTO when linking for macOS with fuzzing for now,
|
||||
# see https://github.com/rust-lang/rust/issues/66285
|
||||
ifdef FUZZING_INTERFACES
|
||||
ifeq ($(OS_ARCH), Darwin)
|
||||
rustflags_lto =
|
||||
endif
|
||||
endif
|
||||
|
||||
# These flags are passed via `cargo rustc` and only apply to the final rustc
|
||||
# invocation (i.e., only the top-level crate, not its dependencies).
|
||||
cargo_rustc_flags = $(CARGO_RUSTCFLAGS)
|
||||
ifndef DEVELOPER_OPTIONS
|
||||
ifndef MOZ_DEBUG_RUST
|
||||
# Enable link-time optimization for release builds, but not when linking
|
||||
# gkrust_gtest.
|
||||
ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
|
||||
cargo_rustc_flags += -Clto
|
||||
endif
|
||||
# Enable link-time optimization for release builds
|
||||
cargo_rustc_flags += $(rustflags_lto)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user