From 2c00b4093d5edfcd5c086ad483bfbbe0cf28d8f7 Mon Sep 17 00:00:00 2001 From: celenity Date: Mon, 30 Mar 2026 15:37:27 -0400 Subject: [PATCH] fix: Disable Rust incremental compilation to ensure builds are fresh (+ minor formatting for Rust env vars) Signed-off-by: celenity --- configs/mozconfigs/build.mozconfig | 5 +++++ scripts/env_common.sh | 2 +- scripts/env_external.sh | 26 ++++++++++++++++---------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/configs/mozconfigs/build.mozconfig b/configs/mozconfigs/build.mozconfig index aac0ab86..8c2777b0 100644 --- a/configs/mozconfigs/build.mozconfig +++ b/configs/mozconfigs/build.mozconfig @@ -24,6 +24,11 @@ ac_add_options --disable-rust-tests export MOZ_DEBUG_FLAGS= export MOZ_PHC= +## Disable Rust incremental compilation +### (Ensures builds are fresh) +### https://doc.rust-lang.org/cargo/reference/profiles.html#incremental +ac_add_options --disable-cargo-incremental + # Do not build with the Android GoogleVR SDK ac_add_options --without-android-googlevr-sdk diff --git a/scripts/env_common.sh b/scripts/env_common.sh index 15c35f88..9581f537 100644 --- a/scripts/env_common.sh +++ b/scripts/env_common.sh @@ -641,7 +641,7 @@ if [[ -z "${IRONFOX_RUST_FLAGS_OVERRIDE+x}" ]]; then fi # Rust flags -IRONFOX_RUST_FLAGS_DEFAULT='-Ccontrol-flow-guard=true -Cdebug-assertions=false -Cdebuginfo=0 -Clink-dead-code=false -Copt-level=3 -Coverflow-checks=true -Cstrip=debuginfo -O' +IRONFOX_RUST_FLAGS_DEFAULT='-Ccontrol-flow-guard=true -Cdebug-assertions=false -Cdebuginfo=0 -Cincremental=false -Clink-dead-code=false -Copt-level=3 -Coverflow-checks=true -Cstrip=debuginfo -O' if [[ -z "${IRONFOX_RUST_FLAGS+x}" ]]; then export IRONFOX_RUST_FLAGS_OVERRIDE=1 export IRONFOX_RUST_FLAGS="${IRONFOX_RUST_FLAGS_DEFAULT}" diff --git a/scripts/env_external.sh b/scripts/env_external.sh index 48860c54..7c7ee759 100644 --- a/scripts/env_external.sh +++ b/scripts/env_external.sh @@ -176,32 +176,38 @@ export RUSTC="${IRONFOX_RUSTC}" export RUSTDOC="${IRONFOX_RUSTDOC}" ## Disable debug -export CARGO_PROFILE_DEV_DEBUG=false -export CARGO_PROFILE_DEV_DEBUG_ASSERTIONS=false -export CARGO_PROFILE_RELEASE_DEBUG=false -export CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS=false +export CARGO_PROFILE_DEV_DEBUG='false' +export CARGO_PROFILE_DEV_DEBUG_ASSERTIONS='false' +export CARGO_PROFILE_RELEASE_DEBUG='false' +export CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS='false' ## Disable HTTP debugging -export CARGO_HTTP_DEBUG=false +export CARGO_HTTP_DEBUG='false' + +## Disable incremental compilation +### (Ensures builds are fresh) +### https://doc.rust-lang.org/cargo/reference/profiles.html#incremental +export CARGO_BUILD_INCREMENTAL='false' +export CARGO_INCREMENTAL=0 ## Display progress bars export CARGO_TERM_PROGRESS_WHEN="${IRONFOX_CARGO_PROGRESS_BAR}" export CARGO_TERM_PROGRESS_WIDTH=80 ## Enable certificate revocation checks -export CARGO_HTTP_CHECK_REVOKE=true +export CARGO_HTTP_CHECK_REVOKE='true' ## Enable colored output export CARGO_TERM_COLOR="${IRONFOX_CARGO_COLORED_OUTPUT}" ## Enable overflow checks -export CARGO_PROFILE_DEV_OVERFLOW_CHECKS=true -export CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS=true +export CARGO_PROFILE_DEV_OVERFLOW_CHECKS='true' +export CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS='true' ## Enable performance optimizations -export CARGO_PROFILE_DEV_LTO=true +export CARGO_PROFILE_DEV_LTO='true' export CARGO_PROFILE_DEV_OPT_LEVEL=3 -export CARGO_PROFILE_RELEASE_LTO=true +export CARGO_PROFILE_RELEASE_LTO='true' export CARGO_PROFILE_RELEASE_OPT_LEVEL=3 ## Strip debug info