diff --git a/build/trivalent.spec b/build/trivalent.spec index f8ad9584..5a9a5e10 100644 --- a/build/trivalent.spec +++ b/build/trivalent.spec @@ -524,7 +524,6 @@ CHROMIUM_GN_DEFINES+=" clang_use_chrome_plugins=false" CHROMIUM_GN_DEFINES+=" rust_sysroot_absolute=\"$(rustc --print sysroot)\"" CHROMIUM_GN_DEFINES+=" rust_bindgen_root=\"$rust_bindgen_root\"" CHROMIUM_GN_DEFINES+=" rustc_version=\"$(rustc --version)\"" -CHROMIUM_GN_DEFINES+=" rustc_nightly_capability=true" CHROMIUM_GN_DEFINES+=" chrome_pgo_phase=0" %endif CHROMIUM_GN_DEFINES+=' system_libdir="%{_lib}"' diff --git a/chromium_patches/0003-Assume-rustc-is-nightly-if-building-Chromium.patch b/chromium_patches/0003-Assume-rustc-is-nightly-if-building-Chromium.patch new file mode 100644 index 00000000..cab4c7b6 --- /dev/null +++ b/chromium_patches/0003-Assume-rustc-is-nightly-if-building-Chromium.patch @@ -0,0 +1,36 @@ +From 272bb673e5a2665321b7a62cbf75f58e60130c5d Mon Sep 17 00:00:00 2001 +From: LN Liberda +Date: Tue, 20 Jan 2026 13:00:55 -0800 +Subject: [PATCH] Assume rustc is nightly if building Chromium +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Nightly is required to build full Chromium. +This variable was introduced to build just V8 with ancient Rust, +and is mostly used to bring incompatibilities with current Rust versions. + +Bug: none +Change-Id: Ie652a7af8414aac5d7dc7cf9f1c27f04b5ed1034 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7492958 +Commit-Queue: Łukasz Anforowicz +Reviewed-by: Daniel Cheng +Reviewed-by: Łukasz Anforowicz +Cr-Commit-Position: refs/heads/main@{#1571838} +--- + build/config/rust.gni | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/config/rust.gni b/build/config/rust.gni +index 36a1fdd350f4ac..f88d57f45996cb 100644 +--- a/build/config/rust.gni ++++ b/build/config/rust.gni +@@ -121,7 +121,7 @@ use_chromium_rust_toolchain = rust_sysroot_absolute == "" + # `rustc_nightly_capability = false` will make the build avoid the use of + # Rust nightly features. There are no bots that test this and there is no + # guarantee it will work, but we accept patches for this configuration. +-rustc_nightly_capability = use_chromium_rust_toolchain ++rustc_nightly_capability = use_chromium_rust_toolchain || build_with_chromium + + # Platform support for the Rust toolchain. + chromium_toolchain_supports_platform = !is_wasm