diff --git a/Cargo.toml b/Cargo.toml index 85796ef0488c..d6a7044c9289 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,6 +63,14 @@ rpath = false debug-assertions = false panic = "abort" +# Optimize build dependencies, because bindgen and proc macros / style +# compilation take more to run than to build otherwise. +[profile.dev.build-override] +opt-level = 1 + +[profile.release.build-override] +opt-level = 1 + [patch.crates-io] chardetng = { git = "https://github.com/hsivonen/chardetng", rev="7d5e0608d3e012bdfea3bd199111e3546607dd31" } libudev-sys = { path = "dom/webauthn/libudev-sys" } diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure index 89a78aa83ccb..c83496816bcf 100644 --- a/build/moz.configure/rust.configure +++ b/build/moz.configure/rust.configure @@ -165,7 +165,7 @@ def rust_compiler(rustc_info, cargo_info, build_project): ) ) if build_project == "tools/crashreporter": - rustc_min_version = Version("1.38.0") + rustc_min_version = Version("1.47.0") else: rustc_min_version = Version(MINIMUM_RUST_VERSION) cargo_min_version = rustc_min_version diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk index 3e98a1d16ce7..615d54076b20 100644 --- a/config/makefiles/rust.mk +++ b/config/makefiles/rust.mk @@ -72,14 +72,11 @@ ifndef MOZ_LTO_RUST_CROSS ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE))) cargo_rustc_flags += -Clto endif -# Versions of rust >= 1.45 need -Cembed-bitcode=yes for all crates when -# using -Clto. -ifeq (,$(filter 1.38.% 1.39.% 1.40.% 1.41.% 1.42.% 1.43.% 1.44.%,$(RUSTC_VERSION))) +# We need -Cembed-bitcode=yes for all crates when using -Clto. RUSTFLAGS += -Cembed-bitcode=yes endif endif endif -endif ifdef CARGO_INCREMENTAL export CARGO_INCREMENTAL