summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-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 @@
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