chromium: update to 138.0.7204.92.

This commit is contained in:
Duncaen 2025-06-30 01:44:50 +02:00
parent 797e865fca
commit 688ca5b419
No known key found for this signature in database
GPG key ID: 335C1D17EC3D6E35
11 changed files with 228 additions and 129 deletions

View file

@ -1,10 +0,0 @@
--- a/build/rust/std/BUILD.gn
+++ b/build/rust/std/BUILD.gn
@@ -100,7 +100,6 @@
# don't need to pass to the C++ linker because they're used for specialized
# purposes.
skip_stdlib_files = [
- "profiler_builtins",
"rustc_std_workspace_alloc",
"rustc_std_workspace_core",
"rustc_std_workspace_std",

View file

@ -0,0 +1,21 @@
error[E0463]: can't find crate for `rustc_literal_escaper` which `proc_macro` depends on
--> ../../third_party/rust/chromium_crates_io/vendor/proc-macro2-v1/src/lib.rs:139:1
|
139 | extern crate proc_macro;
| ^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
|
= help: maybe you need to install the missing components with: `rustup component add rust-src rustc-dev llvm-tools-preview`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0463`.
--- a/build/rust/std/BUILD.gn
+++ b/build/rust/std/BUILD.gn
@@ -40,6 +40,7 @@
"panic_abort",
"panic_unwind",
"rustc_demangle",
+ "rustc_literal_escaper",
"std_detect",
"test",
"unicode_width",

View file

@ -0,0 +1,63 @@
--- a/build/toolchain/toolchain.gni
+++ b/build/toolchain/toolchain.gni
@@ -51,6 +51,10 @@
}
}
+declare_args() {
+ is_musl = false
+}
+
# Extension for shared library files (including leading dot).
if (is_apple) {
shlib_extension = ".dylib"
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1216,8 +1220,13 @@
if (current_cpu == "x64") {
if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
!is_chromeos_device) {
- cflags += [ "--target=x86_64-unknown-linux-gnu" ]
- ldflags += [ "--target=x86_64-unknown-linux-gnu" ]
+ if (is_musl) {
+ cflags += [ "--target=x86_64-unknown-linux-musl" ]
+ ldflags += [ "--target=x86_64-unknown-linux-musl" ]
+ } else {
+ cflags += [ "--target=x86_64-unknown-linux-gnu" ]
+ ldflags += [ "--target=x86_64-unknown-linux-gnu" ]
+ }
} else {
cflags += [ "-m64" ]
ldflags += [ "-m64" ]
@@ -1225,8 +1234,13 @@
cflags += [ "-msse3" ]
} else if (current_cpu == "x86") {
if (is_clang && !is_android && !is_nacl && !is_chromeos_device) {
- cflags += [ "--target=i386-unknown-linux-gnu" ]
- ldflags += [ "--target=i386-unknown-linux-gnu" ]
+ if (is_musl) {
+ cflags += [ "--target=i386-unknown-linux-musl" ]
+ ldflags += [ "--target=i386-unknown-linux-musl" ]
+ } else {
+ cflags += [ "--target=i386-unknown-linux-gnu" ]
+ ldflags += [ "--target=i386-unknown-linux-gnu" ]
+ }
} else {
cflags += [ "-m32" ]
ldflags += [ "-m32" ]
@@ -1254,8 +1268,13 @@
} else if (current_cpu == "arm64") {
if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
!is_chromeos_device) {
- cflags += [ "--target=aarch64-linux-gnu" ]
- ldflags += [ "--target=aarch64-linux-gnu" ]
+ if (is_musl) {
+ cflags += [ "--target=aarch64-linux-musl" ]
+ ldflags += [ "--target=aarch64-linux-musl" ]
+ } else {
+ cflags += [ "--target=aarch64-linux-gnu" ]
+ ldflags += [ "--target=aarch64-linux-gnu" ]
+ }
}
} else if (current_cpu == "mipsel" && !is_nacl) {
ldflags += [ "-Wl,--hash-style=sysv" ]

View file

@ -1,8 +1,8 @@
--- a/build/config/clang/BUILD.gn
+++ b/build/config/clang/BUILD.gn
@@ -128,14 +128,15 @@
} else if (is_apple) {
_dir = "darwin"
@@ -208,14 +208,15 @@
assert(false) # Unhandled cpu type
}
} else if (is_linux || is_chromeos) {
+ _dir = "linux"
if (current_cpu == "x64") {
@ -17,6 +17,6 @@
} else if (current_cpu == "arm64") {
- _dir = "aarch64-unknown-linux-gnu"
+ _suffix = "-aarch64"
} else if (current_cpu == "loong64") {
_dir = "loongarch64-unknown-linux-gnu"
} else {
assert(false) # Unhandled cpu type
}

View file

@ -1,16 +1,3 @@
--- a/build/toolchain/toolchain.gni
+++ b/build/toolchain/toolchain.gni
@@ -51,6 +51,10 @@
}
}
+declare_args() {
+ is_musl = false
+}
+
# Extension for shared library files (including leading dot).
if (is_apple) {
shlib_extension = ".dylib"
--- a/build/config/rust.gni
+++ b/build/config/rust.gni
@@ -196,7 +196,18 @@
@ -33,3 +20,28 @@
if (current_cpu == "arm64") {
rust_abi_target = "aarch64-unknown-linux-gnu"
cargo_target_abi = ""
--- a/build/rust/known-target-triples.txt
+++ b/build/rust/known-target-triples.txt
@@ -17,6 +17,7 @@
aarch64-pc-windows-msvc
aarch64-unknown-fuchsia
aarch64-unknown-linux-gnu
+aarch64-unknown-linux-musl
arm64e-apple-ios
arm-unknown-linux-gnueabi
arm-unknown-linux-gnueabihf
@@ -28,6 +29,7 @@
i686-linux-android
i686-pc-windows-msvc
i686-unknown-linux-gnu
+i686-unknown-linux-musl
loongarch64-unknown-linux-gnu
riscv64-linux-android
riscv64gc-unknown-linux-gnu
@@ -41,5 +43,6 @@
x86_64-pc-windows-msvc
x86_64-unknown-fuchsia
x86_64-unknown-linux-gnu
+x86_64-unknown-linux-musl
powerpc64le-unknown-linux-gnu
s390x-unknown-linux-gnu

View file

@ -0,0 +1,31 @@
From e8daefd959e37ca94e99e486927423c0bb24e293 Mon Sep 17 00:00:00 2001
From: LN Liberda <lauren@selfisekai.rocks>
Date: Wed, 28 May 2025 22:51:21 +0200
Subject: [PATCH] Don't check glibc search path if not using glibc
Bug: 40244829
---
ui/gtk/ime_compat_check.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ui/gtk/ime_compat_check.cc b/ui/gtk/ime_compat_check.cc
index 3c33ab502bca0..531e7ca60ee09 100644
--- a/ui/gtk/ime_compat_check.cc
+++ b/ui/gtk/ime_compat_check.cc
@@ -35,6 +35,8 @@ struct InputMethod {
std::vector<base::FilePath> GetLibrarySearchPaths() {
std::vector<base::FilePath> search_path;
+
+#if defined(__GLIBC__)
void* handle = dlopen("libc.so.6", RTLD_GLOBAL | RTLD_LAZY | RTLD_NOLOAD);
if (!handle) {
return search_path;
@@ -60,6 +62,7 @@ std::vector<base::FilePath> GetLibrarySearchPaths() {
// SAFETY: The range is bound by `serinfo.dls_cnt`.
search_path.emplace_back(UNSAFE_BUFFERS(sip->dls_serpath[j].dls_name));
}
+#endif
return search_path;
}

View file

@ -0,0 +1,67 @@
From 41bd9e8e46a97cfe8a0dfd2c2626aa7d4809ed4d Mon Sep 17 00:00:00 2001
From: LN Liberda <lauren@selfisekai.rocks>
Date: Wed, 28 May 2025 12:10:07 +0200
Subject: [PATCH] Allow to disable the Node.js version check with a build arg
For distributions building Chromium with their own Node.js binaries,
version mismatches are expected. Keep the check on by default,
but allow to opt-out of it.
Bug: 401522564
Change-Id: I211279a607b5b5fefd13614b177e55e57ba804c1
---
third_party/node/BUILD.gn | 40 ++++++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 15 deletions(-)
diff --git a/third_party/node/BUILD.gn b/third_party/node/BUILD.gn
index 1741e14401c8c..75631fac8b462 100644
--- a/third_party/node/BUILD.gn
+++ b/third_party/node/BUILD.gn
@@ -4,22 +4,32 @@
import("//third_party/node/node.gni")
-node("check_version") {
- script = "check_version.py"
+declare_args() {
+ # Check the version of the Node.js binary.
+ node_version_check = true
+}
+
+if (node_version_check) {
+ node("check_version") {
+ script = "check_version.py"
- expected_version_file = "update_node_binaries"
- inputs = [
- expected_version_file,
- "check_version.js",
- ]
+ expected_version_file = "update_node_binaries"
+ inputs = [
+ expected_version_file,
+ "check_version.js",
+ ]
- out_file = "${target_gen_dir}/check_version_result.txt"
- outputs = [ out_file ]
+ out_file = "${target_gen_dir}/check_version_result.txt"
+ outputs = [ out_file ]
- args = [
- "--expected_version_file",
- rebase_path(expected_version_file, root_build_dir),
- "--out_file",
- rebase_path(out_file, root_build_dir),
- ]
+ args = [
+ "--expected_version_file",
+ rebase_path(expected_version_file, root_build_dir),
+ "--out_file",
+ rebase_path(out_file, root_build_dir),
+ ]
+ }
+} else {
+ group("check_version") {
+ }
}

View file

@ -1,21 +1,3 @@
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1257,8 +1257,13 @@
} else if (current_cpu == "arm64") {
if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
!is_chromeos_device) {
- cflags += [ "--target=aarch64-linux-gnu" ]
- ldflags += [ "--target=aarch64-linux-gnu" ]
+ if (is_musl) {
+ cflags += [ "--target=aarch64-linux-musl" ]
+ ldflags += [ "--target=aarch64-linux-musl" ]
+ } else {
+ cflags += [ "--target=aarch64-linux-gnu" ]
+ ldflags += [ "--target=aarch64-linux-gnu" ]
+ }
}
} else if (current_cpu == "mipsel" && !is_nacl) {
ldflags += [ "-Wl,--hash-style=sysv" ]
--- a/build/toolchain/linux/unbundle/BUILD.gn.orig
+++ b/build/toolchain/linux/unbundle/BUILD.gn
@@ -39,3 +39,22 @@
@ -41,17 +23,6 @@
+ v8_current_cpu = target_cpu
+ }
+}
--- a/build/config/linux/pkg_config.gni.orig
+++ b/build/config/linux/pkg_config.gni
@@ -91,7 +91,7 @@
assert(defined(invoker.packages),
"Variable |packages| must be defined to be a list in pkg_config.")
config(target_name) {
- if (host_toolchain == current_toolchain) {
+ if (current_cpu != target_cpu) {
args = common_pkg_config_args + host_pkg_config_args + invoker.packages
} else {
args = common_pkg_config_args + pkg_config_args + invoker.packages
--- a/build/config/clang/BUILD.gn
+++ b/build/config/clang/BUILD.gn
@@ -168,7 +168,11 @@

View file

@ -1,22 +1,13 @@
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1641,7 +1641,7 @@
# Some build configs use older versions of clang that don't support WSMs
if (!is_nacl && default_toolchain != "//build/toolchain/cros:target" &&
!llvm_android_mainline && is_clang &&
- clang_warning_suppression_file != "") {
+ clang_warning_suppression_file != "" && clang_version != "19") {
from_build_root =
rebase_path(clang_warning_suppression_file, root_build_dir)
inputs = [ clang_warning_suppression_file ]
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -627,7 +627,7 @@
# TODO(crbug.com/413427035): Remove once
# https://github.com/llvm/llvm-project/pull/136867/ is landed.
if (!is_win && !llvm_android_mainline &&
- default_toolchain != "//build/toolchain/cros:target") {
+ default_toolchain != "//build/toolchain/cros:target" && clang_version != "19") {
cflags += [ "-fextend-variable-liveness=none" ]
}
@@ -328,6 +328,10 @@
configs -= [ ":clang_warning_suppression" ]
}
+ if (clang_version == "19") {
+ configs -= [ ":clang_warning_suppression" ]
+ }
+
# Here we enable -fno-delete-null-pointer-checks, which makes various nullptr
# operations (e.g. dereferencing) into defined behavior. This avoids deletion
# of some security-critical code: see https://crbug.com/1139129.

View file

@ -1,50 +0,0 @@
From 83f11d630aa1cb6d5ceb292364412f7b0585a201 Mon Sep 17 00:00:00 2001
From: Matt Jolly <kangie@gentoo.org>
Date: Mon, 19 May 2025 11:21:10 -0700
Subject: [PATCH] Fix build with system libpng
`cbc692a42241970e1da492d5b14326e81ecb1061` refactored
`fxcodec::CFX_DIBAttribute` and changed the names of its members.
Unfortunately this change appears to have been typo'd in the
'system libpng' build path, which is not checked by CI, resulting
in downstream build failures in Chromium.
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Change-Id: Id4c2c24f76cb709a0bc78badcaf63eb9c5868fe3
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/132130
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
---
AUTHORS | 1 +
core/fxcodec/png/png_decoder.cpp | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index 3cd57a711..567f8f5c9 100644
--- a/third_party/pdfium/AUTHORS
+++ b/third_party/pdfium/AUTHORS
@@ -32,6 +32,7 @@ Justin Pierce <brkfstmnchr@gmail.com>
Ke Liu <stackexploit@gmail.com>
Luật Nguyễn <manhluat93.php@gmail.com>
Manuel Geißer <geisserml@gmail.com>
+Matt Jolly <kangie@gentoo.org>
Michael Doppler <m.doppler@gmail.com>
Miklos Vajna <vmiklos@vmiklos.hu>
Minh Trần <myoki.crystal@gmail.com>
diff --git a/core/fxcodec/png/png_decoder.cpp b/core/fxcodec/png/png_decoder.cpp
index 278e381ea..7b6edcd04 100644
--- a/third_party/pdfium/core/fxcodec/png/png_decoder.cpp
+++ b/third_party/pdfium/core/fxcodec/png/png_decoder.cpp
@@ -52,8 +52,8 @@ void _png_load_bmp_attribute(png_structp png_ptr,
CFX_DIBAttribute* pAttribute) {
if (pAttribute) {
#if defined(PNG_pHYs_SUPPORTED)
- pAttribute->xdpi_ = png_get_x_pixels_per_meter(png_ptr, info_ptr);
- pAttribute->ydpi_ = png_get_y_pixels_per_meter(png_ptr, info_ptr);
+ pAttribute->x_dpi_ = png_get_x_pixels_per_meter(png_ptr, info_ptr);
+ pAttribute->y_dpi_ = png_get_y_pixels_per_meter(png_ptr, info_ptr);
png_uint_32 res_x, res_y;
int unit_type;
png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, &unit_type);

View file

@ -1,7 +1,7 @@
# Template file for 'chromium'
pkgname=chromium
# See https://chromiumdash.appspot.com/releases?platform=Linux for the latest version
version=137.0.7151.103
version=138.0.7204.92
revision=1
archs="i686* x86_64* aarch64* armv7l*"
_llvmver=19
@ -30,8 +30,9 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://www.chromium.org/"
distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${version}.tar.xz"
#distfiles="https://chromium-tarballs.distfiles.gentoo.org/chromium-${version}.tar.xz"
checksum=31083a39c661942a3617e272787a3927f9b7eeaf2a4e2de1ac3affc8a7f05ef3
# distfiles="https://chromium-tarballs.distfiles.gentoo.org/chromium-${version}.tar.xz"
# distfiles="https://chromium.googlesource.com/chromium/src.git/+archive/refs/tags/${version}.tar.gz"
checksum=b7c4985e41e8c581355a577ab3f114d41433c94e655916d4c1cf4cf31c277964
lib32disabled=yes
@ -218,6 +219,8 @@ do_configure() {
'rust_bindgen_root="/usr"'
"rustc_version=\"$(rustc --version)\""
'node_version_check=false'
# is_debug makes the build a debug build, changes some things.
# might be useful for real debugging vs just debug symbols.
"is_debug=false"