10
1

update for chromium-136

This commit is contained in:
Ruediger Oertel
2025-05-02 16:49:55 +02:00
parent 2bb4cbc0e7
commit 66bbaf63b4
12 changed files with 260 additions and 70 deletions

View File

@@ -1,17 +1,6 @@
From 307a0f63dd9b118f4b8470ed3d7567e81fdb7a6d Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Tue, 15 Nov 2022 10:27:58 +0000
Subject: [PATCH] Disable various compiler configs
---
build/config/compiler/BUILD.gn | 134 +++++----------------------------
1 file changed, 17 insertions(+), 117 deletions(-)
Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
===================================================================
--- chromium-126.0.6478.8.orig/build/config/compiler/BUILD.gn
+++ chromium-126.0.6478.8/build/config/compiler/BUILD.gn
@@ -305,9 +305,7 @@ config("compiler") {
--- chromium-136.0.7103.17/build/config/compiler/BUILD.gn 2025/04/04 13:01:25 1.1
+++ chromium-136.0.7103.17/build/config/compiler/BUILD.gn 2025/04/04 13:02:18
@@ -307,9 +307,7 @@
configs += [
# See the definitions below.
@@ -20,8 +9,8 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
- ":compiler_cpu_abi",
":compiler_codegen",
":compiler_deterministic",
]
@@ -566,63 +566,6 @@
":clang_warning_suppression",
@@ -567,62 +565,6 @@
ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
}
@@ -75,8 +64,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
-
- # Enable ELF CREL (see crbug.com/357878242) for all platforms that use ELF
- # (excluding toolchains that use an older version of LLVM).
- # TODO(crbug.com/376278218): This causes segfault on Linux ARM builds.
- if (is_linux && !llvm_android_mainline && current_cpu != "arm" &&
- if (is_linux && !llvm_android_mainline &&
- default_toolchain != "//build/toolchain/cros:target") {
- cflags += [ "-Wa,--crel,--allow-experimental-crel" ]
- }
@@ -85,7 +73,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
# C11/C++11 compiler flags setup.
# ---------------------------
if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
@@ -1538,52 +1489,6 @@ config("compiler_deterministic") {
@@ -1554,52 +1496,6 @@
}
}
@@ -138,7 +126,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
# Tells the compiler not to use absolute paths when passing the default
# paths to the tools it invokes. We don't want this because we don't
# really need it and it can mess up the RBE cache entries.
@@ -1602,28 +1507,6 @@ config("compiler_deterministic") {
@@ -1618,28 +1514,6 @@
}
}
@@ -164,10 +152,10 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
- }
-}
-
config("rustc_revision") {
if (rustc_revision != "") {
# Similar to the above config, this is here so that all files get recompiled
@@ -1983,10 +1871,6 @@ config("chromium_code") {
# Controls the usage of a warning suppression mapping (WSM) file to suppress
# warnings based on the path of the file they come from. It's controlled by the
# `clang_warning_suppression_file` gn argument , which points to a text file
@@ -2112,10 +1986,6 @@
}
} else {
cflags = [ "-Wall" ]
@@ -178,7 +166,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
# In Chromium code, we define __STDC_foo_MACROS in order to get the
# C99 macros on Mac and Linux.
@@ -1995,24 +1879,6 @@ config("chromium_code") {
@@ -2124,24 +1994,6 @@
"__STDC_FORMAT_MACROS",
]
@@ -203,7 +191,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
if (is_apple) {
cflags_objc = [ "-Wimplicit-retain-self" ]
cflags_objcc = [ "-Wimplicit-retain-self" ]
@@ -2442,7 +2325,8 @@ config("default_stack_frames") {
@@ -2564,7 +2416,8 @@
# [0]: https://pinpoint-dot-chromeperf.appspot.com/job/147634a8be0000
# [1]: https://pinpoint-dot-chromeperf.appspot.com/job/132bc772be0000
# [2]: https://crrev.com/c/5447532
@@ -213,7 +201,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
if (is_win) {
# clang-cl's /O2 corresponds to clang's -O3, and really want -O2 for
# consistency with the other platforms.
@@ -2450,7 +2317,8 @@ config("optimize") {
@@ -2613,7 +2466,8 @@
}
# Turn off optimizations.
@@ -223,7 +211,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
if (is_win) {
cflags = [
"/Od", # Disable optimization.
@@ -2490,7 +2358,8 @@ config("no_optimize") {
@@ -2648,7 +2502,8 @@
# Turns up the optimization level. Used to explicitly enable -O2 instead of
# -Os for select targets on platforms that use optimize_for_size. No-op
# elsewhere.
@@ -233,7 +221,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
if (is_nacl && is_nacl_irt) {
# The NaCl IRT is a special case and always wants its own config.
# Various components do:
@@ -2523,7 +2392,8 @@ config("optimize_max") {
@@ -2681,7 +2536,8 @@
#
# TODO(crbug.com/41259697) - rework how all of these configs are related
# so that we don't need this disclaimer.
@@ -243,7 +231,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
if (is_nacl && is_nacl_irt) {
# The NaCl IRT is a special case and always wants its own config.
# Various components do:
@@ -2552,7 +2422,8 @@ config("optimize_speed") {
@@ -2710,7 +2566,8 @@
}
}
@@ -253,7 +241,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
cflags = [ "-O1" ] + common_optimize_on_cflags
rustflags = [ "-Copt-level=1" ]
ldflags = common_optimize_on_ldflags
@@ -2685,7 +2556,8 @@ config("win_pdbaltpath") {
@@ -2841,7 +2698,8 @@
}
# Full symbols.
@@ -263,7 +251,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
rustflags = []
configs = []
if (is_win) {
@@ -2835,7 +2707,8 @@ config("symbols") {
@@ -3003,7 +2861,8 @@
# Minimal symbols.
# This config guarantees to hold symbol for stack trace which are shown to user
# when crash happens in unittests running on buildbot.
@@ -273,7 +261,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
rustflags = []
if (is_win) {
# Functions, files, and line tables only.
@@ -2920,7 +2793,8 @@ config("minimal_symbols") {
@@ -3088,7 +2947,8 @@
# This configuration contains function names only. That is, the compiler is
# told to not generate debug information and the linker then just puts function
# names in the final debug information.

BIN
chromium-135.0.7049.114.tar.xz (Stored with Git LFS)

Binary file not shown.

BIN
chromium-136.0.7103.59.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,178 @@
From b9f7ffacaa06eb2b1ef1d8f1600845a048ada0d6 Mon Sep 17 00:00:00 2001
From: Devon Loehr <dloehr@google.com>
Date: Wed, 26 Mar 2025 06:55:13 -0700
Subject: [PATCH] Add warning suppression mapping file to the build
This adds an (empty) warning suppression mapping file, per the linked bug. It controls its use by adding a new gn arg pointing to the file, and passing the WSM to each clang compilation if the arg is set. Since the arg is set in our `.gn` file, consumers of our `build/` directory will see no change, but can choose to use their own WSM file if they wish.
It also contains some hacks/configs to make sure the file gets uploaded by reclient/siso.
So far, the file is unused, but we'll start filling it out as we make progress enabling warnings.
Change-Id: I0493109c1c365643b97de937286ca7d0a4f89729
Bug: 404297941
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6344734
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Devon Loehr <dloehr@google.com>
Cr-Commit-Position: refs/heads/main@{#1438081}
diff --git a/.gn b/.gn
index 3f65718281973..54d2631ec2032 100644
--- a/.gn
+++ b/.gn
@@ -74,6 +74,7 @@ default_args = {
devtools_visibility = [ "*" ]
clang_unsafe_buffers_paths = "//build/config/unsafe_buffers_paths.txt"
+ clang_warning_suppression_file = "//build/config/warning_suppression.txt"
}
# These are the targets to skip header checking by default. The files in targets
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 3f3ea354f3ee6..a9d2caeb1c92e 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -184,6 +184,7 @@ declare_args() {
# Unsafe buffers. Location of file used by plugins to track portions of
# the codebase which have been made manifestly safe.
clang_unsafe_buffers_paths = ""
+ clang_warning_suppression_file = ""
}
# ==============================================================================
diff --git a/build/config/OWNERS b/build/config/OWNERS
index 8a097f03eee10..2dbcc3916d893 100644
--- a/build/config/OWNERS
+++ b/build/config/OWNERS
@@ -5,3 +5,8 @@ per-file cast.gni=file://build/config/chromecast/OWNERS
per-file unsafe_buffers_paths.txt=arthursonzogni@chromium.org
per-file unsafe_buffers_paths.txt=tsepez@chromium.org
+
+per-file warning_suppression.txt=dloehr@google.com
+per-file warning_suppression.txt=thakis@chromium.org
+per-file warning_suppression.txt=hans@chromium.org
+per-file warning_suppression.txt=tsepez@chromium.org
diff --git a/build/config/clang/clang.gni b/build/config/clang/clang.gni
index e120a847c6d43..2ad331d38f6b6 100644
--- a/build/config/clang/clang.gni
+++ b/build/config/clang/clang.gni
@@ -51,18 +51,26 @@ lld_emit_indexes_and_imports =
lld_emit_indexes_and_imports && is_a_target_toolchain
# TODO(crbug.com/326584510): Reclient does not upload `inputs` from C/C++
-# targets. This file is added to `inputs` for all C targets in
-# //build/config/BUILDCONFIG.gn via //build/config/clang:unsafe_buffers.
-# We work around the bug in Reclient by specifying the file here.
-#
-# This is a comma-delimited list of paths relative to the source tree root. The
-# leading space is important, if the string is non-empty. :)
-rbe_bug_326584510_missing_inputs = ""
+# targets. We work around the bug in Reclient by
+# specifying the files here.
+rbe_bug_326584510_missing_input_list = []
if (clang_use_chrome_plugins && defined(clang_unsafe_buffers_paths) &&
"$clang_unsafe_buffers_paths" != "") {
if (rbe_exec_root != rebase_path("//")) {
assert(!use_siso, "Can't use non-default rbe_exec_root with siso.")
}
- from_exec_root = rebase_path(clang_unsafe_buffers_paths, rbe_exec_root)
- rbe_bug_326584510_missing_inputs = " -inputs=$from_exec_root"
+ rbe_bug_326584510_missing_input_list +=
+ [ rebase_path(clang_unsafe_buffers_paths, rbe_exec_root) ]
}
+if (defined(clang_warning_suppression_file) &&
+ "$clang_warning_suppression_file" != "") {
+ if (rbe_exec_root != rebase_path("//")) {
+ assert(!use_siso, "Can't use non-default rbe_exec_root with siso.")
+ }
+ rbe_bug_326584510_missing_input_list +=
+ [ rebase_path(clang_warning_suppression_file, rbe_exec_root) ]
+}
+
+# The leading space is important, if the string is non-empty.
+rbe_bug_326584510_missing_inputs =
+ " -inputs=" + string_join(",", rbe_bug_326584510_missing_input_list)
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 037d3b769add3..5b07f038e6bab 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -310,6 +310,7 @@
":rustc_revision",
":compiler_codegen",
":compiler_deterministic",
+ ":clang_warning_suppression",
]
# Here we enable -fno-delete-null-pointer-checks, which makes various nullptr
@@ -1650,6 +1651,31 @@ config("clang_revision") {
}
}
+# Controls the usage of a warning suppression mapping (WSM) file to suppress
+# warnings based on the path of the file they come from. It's controlled by the
+# `clang_warning_suppression_file` gn argument , which points to a text file
+# defining which warnings should be suppressed where.
+# See //build/config/warning_suppression.txt for an example file; this is the
+# file used by Chromium.
+#
+# To use a different file, or to use this functionality outside of chromium,
+# set the `clang_warning_suppression_file` argument to point to the new file,
+# e.g. by setting in the the project's .gn file.
+config("clang_warning_suppression") {
+ # 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 != "") {
+ from_build_root =
+ rebase_path(clang_warning_suppression_file, root_build_dir)
+ inputs = [ clang_warning_suppression_file ]
+ cflags = [
+ "-Xclang",
+ "--warning-suppression-mappings=" + from_build_root,
+ ]
+ }
+}
+
config("rustc_revision") {
if (rustc_revision != "") {
# Similar to the above config, this is here so that all files get recompiled
diff --git a/build/config/siso/clang_all.star b/build/config/siso/clang_all.star
index 9aea43bd81883..ca062f967b5d1 100644
--- a/build/config/siso/clang_all.star
+++ b/build/config/siso/clang_all.star
@@ -87,15 +87,19 @@ __input_deps = {
],
"third_party/llvm-build/Release+Asserts/bin/clang": [
"build/config/unsafe_buffers_paths.txt",
+ "build/config/warning_suppression.txt",
],
"third_party/llvm-build/Release+Asserts/bin/clang++": [
"build/config/unsafe_buffers_paths.txt",
+ "build/config/warning_suppression.txt",
],
"third_party/llvm-build/Release+Asserts/bin/clang-cl": [
"build/config/unsafe_buffers_paths.txt",
+ "build/config/warning_suppression.txt",
],
"third_party/llvm-build/Release+Asserts/bin/clang-cl.exe": [
"build/config/unsafe_buffers_paths.txt",
+ "build/config/warning_suppression.txt",
],
"third_party/llvm-build/Release+Asserts/bin/lld-link": [
"build/config/c++/libc++.natvis",
diff --git a/build/config/warning_suppression.txt b/build/config/warning_suppression.txt
new file mode 100644
index 0000000000000..4f78ea84d3a93
--- /dev/null
+++ b/build/config/warning_suppression.txt
@@ -0,0 +1,9 @@
+# Copyright 2025 The Chromium Project. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Warning suppression mappings are listed here on a per-warning basis.
+# Upstream docs: https://clang.llvm.org/docs/WarningSuppressionMappings.html
+# We'll put the policy here too when it's written.
+# Don't use this file until the policy is written.
+# See crbug.com/404297941 for more information.

View File

@@ -1,3 +1,27 @@
-------------------------------------------------------------------
Fri May 2 16:40:19 CEST 2025 - ro@suse.de
- Chromium 136.0.7103.48
(stable release 2025-04-29) (boo#1242153)
* CVE-2025-4096: Heap buffer overflow in HTML. Reported by Anonymous on 2025-04-11
* CVE-2025-4050: Out of bounds memory access in DevTools. Reported by Anonymous on 2025-04-09
* CVE-2025-4051: Insufficient data validation in DevTools. Reported by Daniel Fröjdendahl on 2025-03-1
* CVE-2025-4052: Inappropriate implementation in DevTools. Reported by vanillawebdev on 2025-03-10
- added patches:
chromium-warning-suppression-mappings.patch
(from upstream, revert for llvm < 20)
- dropped patches:
fix-build-with-pipewire-1.3.82.patch (upstream)
- modified patches:
chromium-125-compiler.patch (context)
gtk-414.patch (one more place with GSK_SUBSURFACE_NODE)
- bump esbuild from 0.24.0 to 0.25.1
* Fix incorrect paths in inline source maps (#4070, #4075, #4105)
* Fix invalid generated source maps (#4080, #4082, #4104, #4107)
* Fix a regression with non-file source map paths (#4078)
* Update Go from 1.23.5 to 1.23.7 (#4076, #4077)
-------------------------------------------------------------------
Thu Apr 24 01:38:01 CEST 2025 - ro@suse.de

View File

@@ -58,8 +58,9 @@
%define ffmpeg_version 58
%endif
%bcond_with system_zstd
%define node_ver 22.0
%define node_ver_next 23.0
%define node_ver 22
%define node_ver_next 23
%define node_version %(rpm -q --qf "%%{version}" nodejs%{node_ver})
# LLVM version
%define llvm_version 19
# RUST version
@@ -67,7 +68,7 @@
# GCC version
%define gcc_version 14
# esbuild version
%define esbuild_version 0.24.0
%define esbuild_version 0.25.1
%if 0%{?suse_version} <= 1699
%bcond_with system_webp
%bcond_with system_re2
@@ -106,7 +107,7 @@
%define n_suffix %{nil}
%endif
Name: chromium%{n_suffix}
Version: 135.0.7049.114
Version: 136.0.7103.59
Release: 0
Summary: Google's open source browser project
License: BSD-3-Clause AND LGPL-2.1-or-later
@@ -152,7 +153,6 @@ Patch363: chromium-127-constexpr.patch
Patch364: chromium-129-revert-AVFMT_FLAG_NOH264PARSE.patch
Patch368: chromium-131-clang-stack-protector.patch
Patch369: chromium-132-pdfium-explicit-template.patch
Patch370: fix-build-with-pipewire-1.3.82.patch
Patch371: chromium-133-bring_back_and_disable_allowlist.patch
Patch373: chromium-134-type-mismatch-error.patch
Patch375: chromium-131-fix-qt-ui.pach
@@ -171,6 +171,8 @@ Patch1010: chromium-124-system-libxml.patch
Patch1030: chromium-134-revert-rust-adler2.patch
# gtk4 is too old
Patch1040: gtk-414.patch
# clang is too old
Patch1050: chromium-warning-suppression-mappings.patch
# end conditionally applied patches
BuildRequires: SDL-devel
BuildRequires: bison
@@ -196,7 +198,7 @@ BuildRequires: nasm
BuildRequires: ninja >= 1.7.2
BuildRequires: pam-devel
BuildRequires: pkgconfig
BuildRequires: (nodejs >= %node_ver with nodejs < %node_ver_next)
BuildRequires: (nodejs >= %node_ver.0 with nodejs < %node_ver_next.0)
%if 0%{?suse_version} >= 1600
BuildRequires: python3
BuildRequires: python3-setuptools
@@ -450,6 +452,14 @@ WebDriver is an open source tool for automated testing of webapps across many br
%patch -p1 -R -P 1040
%endif
clang_version="$(clang --version | sed -n 's/clang version //p')"
if [[ $(echo ${clang_version} | cut -d. -f1) -ge 16 ]]; then
clang_version="$(echo ${clang_version} | cut -d. -f1)"
fi
if [ "$clang_version" -lt 20 ] ; then
%patch -p1 -R -P 1050
fi
%build
# esbuild
rm third_party/devtools-frontend/src/third_party/esbuild/esbuild
@@ -469,6 +479,7 @@ popd
mkdir -p third_party/node/linux/node-linux-x64/bin
rm -f third_party/node/linux/node-linux-x64/bin/node
ln -s %{_bindir}/node third_party/node/linux/node-linux-x64/bin/node
sed -i -e "s@^NODE_VERSION=.*@NODE_VERSION=\"v%{node_version}\"@" third_party/node/update_node_binaries
rm buildtools/third_party/eu-strip/bin/eu-strip
ln -s %{_bindir}/eu-strip buildtools/third_party/eu-strip/bin/eu-strip

BIN
esbuild-0.24.0-vendor.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
esbuild-0.24.0.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
esbuild-0.25.1-vendor.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
esbuild-0.25.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,22 +0,0 @@
Index: chromium-133.0.6943.98/third_party/webrtc/modules/video_capture/linux/pipewire_session.cc
===================================================================
--- chromium-133.0.6943.98.orig/third_party/webrtc/modules/video_capture/linux/pipewire_session.cc
+++ chromium-133.0.6943.98/third_party/webrtc/modules/video_capture/linux/pipewire_session.cc
@@ -87,7 +87,7 @@ PipeWireNode::PipeWireNode(PipeWireSessi
.param = OnNodeParam,
};
- pw_node_add_listener(proxy_, &node_listener_, &node_events, this);
+ pw_node_add_listener(reinterpret_cast<pw_node*>(proxy_), &node_listener_, &node_events, this);
}
// static
@@ -119,7 +119,7 @@ void PipeWireNode::OnNodeInfo(void* data
uint32_t id = info->params[i].id;
if (id == SPA_PARAM_EnumFormat &&
info->params[i].flags & SPA_PARAM_INFO_READ) {
- pw_node_enum_params(that->proxy_, 0, id, 0, UINT32_MAX, nullptr);
+ pw_node_enum_params(reinterpret_cast<pw_node *>(that->proxy_), 0, id, 0, UINT32_MAX, nullptr);
break;
}
}

View File

@@ -51,6 +51,17 @@ index 6a18a86ed1570..6c3b820fab09b 100644
};
enum GdkMemoryFormat : int;
@@ -103,6 +103,9 @@ struct _GdkColor {
guint16 blue;
};
+// Not defined in GTK.
+constexpr int GSK_RENDER_NODE_MAX_VALUE = GSK_SUBSURFACE_NODE;
+
constexpr int GTK_ICON_LOOKUP_USE_BUILTIN = 1 << 2;
constexpr int GTK_ICON_LOOKUP_GENERIC_FALLBACK = 1 << 3;
constexpr int GTK_ICON_LOOKUP_FORCE_SIZE = 1 << 4;
diff --git a/ui/gtk/gtk_util.cc b/ui/gtk/gtk_util.cc
index 0413e6fd94f59..78c4dc6bd57e5 100644
--- a/ui/gtk/gtk_util.cc