Changeset View
Changeset View
Standalone View
Standalone View
files/0001-fix-rust-1.45-build.patch
- This file was added.
| diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk | |||||
| --- a/config/makefiles/rust.mk | |||||
| +++ b/config/makefiles/rust.mk | |||||
| @@ -56,17 +56,21 @@ 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))) | |||||
| +# Pass -Clto for older versions of rust, and CARGO_PROFILE_RELEASE_LTO=true | |||||
| +# for newer ones that support it. Combining the latter with -Clto works, so | |||||
| +# set both everywhere. | |||||
| cargo_rustc_flags += -Clto | |||||
| +export CARGO_PROFILE_RELEASE_LTO=true | |||||
| endif | |||||
| endif | |||||
| endif | |||||
| ifdef CARGO_INCREMENTAL | |||||
| export CARGO_INCREMENTAL | |||||
| endif | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.