diff options
| author | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-03-21 18:56:21 +0100 |
|---|---|---|
| committer | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-03-21 19:04:49 +0100 |
| commit | 5aef3b016bd899e69a40efcf35588ac3dca47cc0 (patch) | |
| tree | 57d18a5545949926105caf289b22b8ec67bb2638 /gnu | |
| parent | b7d94c73ae963232981290bfa3537e74530c6263 (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')
| -rw-r--r-- | gnu/packages/chromium.scm | 36 |
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 @@ | |||
| 417 | "fixes/libcpp-headers.patch" | 417 | "fixes/libcpp-headers.patch" |
| 418 | "fixes/rust-clanglib.patch" | 418 | "fixes/rust-clanglib.patch" |
| 419 | "system/openjpeg.patch" | 419 | "system/openjpeg.patch" |
| 420 | ;; adler2 is not part of our rust toolchain, check on next version. | ||
| 421 | "trixie/adler1.patch" | ||
| 422 | ;; Remove after rust is past | 420 | ;; Remove after rust is past |
| 423 | ;; <https://github.com/rust-lang/rust/pull/141061>. | 421 | ;; <https://github.com/rust-lang/rust/pull/141061>. |
| 424 | "trixie/rust-no-alloc-shim.patch"))) | 422 | "trixie/rust-no-alloc-shim.patch"))) |
| @@ -518,8 +516,8 @@ | |||
| 518 | `(cons "--enable-custom-modes" | 516 | `(cons "--enable-custom-modes" |
| 519 | ,flags)))))) | 517 | ,flags)))))) |
| 520 | 518 | ||
| 521 | (define lld-as-ld-wrapper-19 | 519 | (define lld-as-ld-wrapper-21 |
| 522 | (make-lld-wrapper lld-19 #:lld-as-ld? #t)) | 520 | (make-lld-wrapper lld-21 #:lld-as-ld? #t)) |
| 523 | 521 | ||
| 524 | (define-public ungoogled-chromium | 522 | (define-public ungoogled-chromium |
| 525 | (package | 523 | (package |
| @@ -612,7 +610,7 @@ | |||
| 612 | "\"") | 610 | "\"") |
| 613 | 611 | ||
| 614 | (string-append "clang_version=" | 612 | (string-append "clang_version=" |
| 615 | #$(version-major (package-version clang-19))) | 613 | #$(version-major (package-version clang-21))) |
| 616 | 614 | ||
| 617 | (string-append "rust_sysroot_absolute=\"" | 615 | (string-append "rust_sysroot_absolute=\"" |
| 618 | (dirname (dirname (search-input-file %build-inputs | 616 | (dirname (dirname (search-input-file %build-inputs |
| @@ -630,6 +628,22 @@ | |||
| 630 | ;; invokation and fails if it's just the version number. | 628 | ;; invokation and fails if it's just the version number. |
| 631 | " (f6e511eec 2024-10-15) (built from a source tarball)\"") | 629 | " (f6e511eec 2024-10-15) (built from a source tarball)\"") |
| 632 | 630 | ||
| 631 | ;; Chromium's build/rust/std/BUILD.gn has a hardcoded | ||
| 632 | ;; list of stdlib rlibs (stdlib_files) that GN uses to | ||
| 633 | ;; declare build outputs. GN requires static output | ||
| 634 | ;; declarations, so the list must exactly match what | ||
| 635 | ;; rlibs exist in the Rust sysroot. Chromium's list | ||
| 636 | ;; includes unicode_width because their bundled | ||
| 637 | ;; toolchain (Rust 1.89) ships it as a dependency of | ||
| 638 | ;; getopts 0.2.23. Our Rust 1.93 has getopts 0.2.24 | ||
| 639 | ;; which dropped that dependency, so unicode_width is | ||
| 640 | ;; not in our sysroot. This GN arg removes it from | ||
| 641 | ;; the list. (Chromium's own use of unicode_width via | ||
| 642 | ;; codespan-reporting is a separate vendored copy under | ||
| 643 | ;; third_party/rust/chromium_crates_io/ and is | ||
| 644 | ;; unaffected.) | ||
| 645 | "removed_rust_stdlib_libs=[\"unicode_width\"]" | ||
| 646 | |||
| 633 | ;; Prefer system libraries. | 647 | ;; Prefer system libraries. |
| 634 | "use_system_freetype=true" | 648 | "use_system_freetype=true" |
| 635 | "use_system_harfbuzz=true" | 649 | "use_system_harfbuzz=true" |
| @@ -777,7 +791,7 @@ | |||
| 777 | (string-append " -stdlib=libc++" | 791 | (string-append " -stdlib=libc++" |
| 778 | " -Wl,--stats")) | 792 | " -Wl,--stats")) |
| 779 | (setenv "CLANG_MVERS" #$(version-major | 793 | (setenv "CLANG_MVERS" #$(version-major |
| 780 | (package-version clang-19))) | 794 | (package-version clang-21))) |
| 781 | (setenv "RUSTC_BOOTSTRAP" "1") | 795 | (setenv "RUSTC_BOOTSTRAP" "1") |
| 782 | 796 | ||
| 783 | ;; TODO: pre-compile instead. Avoids a race condition. | 797 | ;; TODO: pre-compile instead. Avoids a race condition. |
| @@ -905,13 +919,13 @@ | |||
| 905 | '("24" "48" "64" "128" "256"))))))))) | 919 | '("24" "48" "64" "128" "256"))))))))) |
| 906 | (native-inputs | 920 | (native-inputs |
| 907 | (list bison | 921 | (list bison |
| 908 | clang-19 | 922 | clang-21 |
| 909 | clang-runtime-19 | 923 | clang-runtime-21 |
| 910 | clang-toolchain-19 | 924 | clang-toolchain-21 |
| 911 | gn | 925 | gn |
| 912 | gperf | 926 | gperf |
| 913 | lld-as-ld-wrapper-19 | 927 | lld-as-ld-wrapper-21 |
| 914 | llvm-19 | 928 | llvm-21 |
| 915 | ninja | 929 | ninja |
| 916 | node-lts | 930 | node-lts |
| 917 | pkg-config | 931 | pkg-config |
