summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@friendly-machines.com>2026-03-21 18:56:21 +0100
committerDanny Milosavljevic <dannym@friendly-machines.com>2026-03-21 19:04:49 +0100
commit5aef3b016bd899e69a40efcf35588ac3dca47cc0 (patch)
tree57d18a5545949926105caf289b22b8ec67bb2638 /gnu/packages
parentb7d94c73ae963232981290bfa3537e74530c6263 (diff)
gnu: ungoogled-chromium: Fix build with Rust 1.93.
* gnu/packages/chromium.scm (%debian-patches): Remove adler2. (lld-as-ld-wrapper-19): Delete variable. (lld-as-ld-wrapper-21): New variable. (ungoogled-chromium)[arguments]<#:configure-flags>: Use clang-21. Update GN output declarations for Rust 1.93. [native-inputs]: Remove clang-19, replace by clang-21. Remove clang-runtime-19, replace by clang-runtime-21. Remove clang-toolchain-19, replace by clang-toolchain-21. Remove lld-as-ld-wrapper-19, replace by lld-as-ld-wrapper-21. Change-Id: If4d780db79fccd6fb6d2213141b3819f75f5585c
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/chromium.scm36
1 files changed, 25 insertions, 11 deletions
diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm
index 12b4517987b..ee46688d0f3 100644
--- a/gnu/packages/chromium.scm
+++ b/gnu/packages/chromium.scm
@@ -417,8 +417,6 @@
"fixes/libcpp-headers.patch"
"fixes/rust-clanglib.patch"
"system/openjpeg.patch"
- ;; adler2 is not part of our rust toolchain, check on next version.
- "trixie/adler1.patch"
;; Remove after rust is past
;; <https://github.com/rust-lang/rust/pull/141061>.
"trixie/rust-no-alloc-shim.patch")))
@@ -518,8 +516,8 @@
`(cons "--enable-custom-modes"
,flags))))))
-(define lld-as-ld-wrapper-19
- (make-lld-wrapper lld-19 #:lld-as-ld? #t))
+(define lld-as-ld-wrapper-21
+ (make-lld-wrapper lld-21 #:lld-as-ld? #t))
(define-public ungoogled-chromium
(package
@@ -612,7 +610,7 @@
"\"")
(string-append "clang_version="
- #$(version-major (package-version clang-19)))
+ #$(version-major (package-version clang-21)))
(string-append "rust_sysroot_absolute=\""
(dirname (dirname (search-input-file %build-inputs
@@ -630,6 +628,22 @@
;; invokation and fails if it's just the version number.
" (f6e511eec 2024-10-15) (built from a source tarball)\"")
+ ;; Chromium's build/rust/std/BUILD.gn has a hardcoded
+ ;; list of stdlib rlibs (stdlib_files) that GN uses to
+ ;; declare build outputs. GN requires static output
+ ;; declarations, so the list must exactly match what
+ ;; rlibs exist in the Rust sysroot. Chromium's list
+ ;; includes unicode_width because their bundled
+ ;; toolchain (Rust 1.89) ships it as a dependency of
+ ;; getopts 0.2.23. Our Rust 1.93 has getopts 0.2.24
+ ;; which dropped that dependency, so unicode_width is
+ ;; not in our sysroot. This GN arg removes it from
+ ;; the list. (Chromium's own use of unicode_width via
+ ;; codespan-reporting is a separate vendored copy under
+ ;; third_party/rust/chromium_crates_io/ and is
+ ;; unaffected.)
+ "removed_rust_stdlib_libs=[\"unicode_width\"]"
+
;; Prefer system libraries.
"use_system_freetype=true"
"use_system_harfbuzz=true"
@@ -777,7 +791,7 @@
(string-append " -stdlib=libc++"
" -Wl,--stats"))
(setenv "CLANG_MVERS" #$(version-major
- (package-version clang-19)))
+ (package-version clang-21)))
(setenv "RUSTC_BOOTSTRAP" "1")
;; TODO: pre-compile instead. Avoids a race condition.
@@ -905,13 +919,13 @@
'("24" "48" "64" "128" "256")))))))))
(native-inputs
(list bison
- clang-19
- clang-runtime-19
- clang-toolchain-19
+ clang-21
+ clang-runtime-21
+ clang-toolchain-21
gn
gperf
- lld-as-ld-wrapper-19
- llvm-19
+ lld-as-ld-wrapper-21
+ llvm-21
ninja
node-lts
pkg-config