Skip to content

Commit 5ee6b74

Browse files
committed
chromium-stable: bump to 126.0.6478.182
1 parent 9231505 commit 5ee6b74

File tree

69 files changed

+2030
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2030
-6
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Patches 0001-0999 are reserved for the building system of chromium.
2+
3+
Patches 1001-2999 are reserved to make chromium work properly on Termux.
4+
5+
1001-1499 are reserved for chromium (base, content, etc.).
6+
1501-1599 are reserved for angle, blink, swiftshader and v8.
7+
2001-2999 are reserved for other 3rd-party libraries and mixed patches.
8+
9+
Patches 6001-6999 are reserved for some patches that cherry-picks or reverts a commit.
10+
11+
Patches 7001-7999 are reserved for some patches related to compiler features or bugs.
12+
13+
Patches 8001-8999 are reserved for some patches that adds missing includes or namespaces.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--- a/build/config/compiler/BUILD.gn
2+
+++ b/build/config/compiler/BUILD.gn
3+
@@ -1898,13 +1898,6 @@
4+
# TODO(crbug.com/328490295): Fix and re-enable for C flags.
5+
"-Wenum-compare-conditional",
6+
]
7+
-
8+
- if (!is_nacl) {
9+
- cflags_cc += [
10+
- # TODO(crbug.com/41486292): Fix and re-enable.
11+
- "-Wno-c++11-narrowing-const-reference",
12+
- ]
13+
- }
14+
}
15+
16+
# Some builders, such as Cronet, use a different version of Clang than
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--- a/build/config/compiler/BUILD.gn
2+
+++ b/build/config/compiler/BUILD.gn
3+
@@ -960,8 +960,8 @@
4+
} else if (current_cpu == "arm") {
5+
if (is_clang && !is_android && !is_nacl &&
6+
!(is_chromeos_lacros && is_chromeos_device)) {
7+
- cflags += [ "--target=arm-linux-gnueabihf" ]
8+
- ldflags += [ "--target=arm-linux-gnueabihf" ]
9+
+ cflags += [ "--target=armv7a-linux-android24" ]
10+
+ ldflags += [ "--target=armv7a-linux-android24" ]
11+
}
12+
if (!is_nacl) {
13+
cflags += [
14+
@@ -975,8 +975,8 @@
15+
} else if (current_cpu == "arm64") {
16+
if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
17+
!(is_chromeos_lacros && is_chromeos_device)) {
18+
- cflags += [ "--target=aarch64-linux-gnu" ]
19+
- ldflags += [ "--target=aarch64-linux-gnu" ]
20+
+ cflags += [ "--target=aarch64-linux-android24" ]
21+
+ ldflags += [ "--target=aarch64-linux-android24" ]
22+
}
23+
} else if (current_cpu == "mipsel" && !is_nacl) {
24+
ldflags += [ "-Wl,--hash-style=sysv" ]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- a/build/config/compiler/BUILD.gn
2+
+++ b/build/config/compiler/BUILD.gn
3+
@@ -1919,6 +1912,11 @@
4+
}
5+
}
6+
7+
+ cflags += [
8+
+ "-Wno-unknown-warning-option",
9+
+ "-Wno-unknown-pragmas",
10+
+ ]
11+
+
12+
# Rust warnings
13+
14+
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
--- a/build/config/clang/clang.gni
2+
+++ b/build/config/clang/clang.gni
3+
@@ -35,6 +35,9 @@
4+
# Set to true to enable output of ThinLTO index and import files used for
5+
# creating a Chromium MLGO corpus in the ThinLTO case.
6+
lld_emit_indexes_and_imports = false
7+
+
8+
+ custom_toolchain_clang_base_path = ""
9+
+ custom_toolchain_clang_version = ""
10+
}
11+
12+
# We don't really need to collect a corpus for the host tools, just for the target.
13+
--- a/build/config/clang/BUILD.gn
14+
+++ b/build/config/clang/BUILD.gn
15+
@@ -5,6 +5,8 @@
16+
import("//build/config/rust.gni")
17+
import("clang.gni")
18+
19+
+import("//v8/gni/snapshot_toolchain.gni")
20+
+
21+
if (is_ios) {
22+
import("//build/config/ios/config.gni") # For `target_environment`
23+
}
24+
@@ -186,6 +186,21 @@
25+
}
26+
27+
_clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib"
28+
+
29+
+ if (is_a_target_toolchain && current_toolchain != v8_snapshot_toolchain) {
30+
+ _dir = "linux"
31+
+ _clang_lib_dir = "$custom_toolchain_clang_base_path/lib/clang/$custom_toolchain_clang_version/lib"
32+
+ if (current_cpu == "x64") {
33+
+ _suffix = "-x86_64-android"
34+
+ } else if (current_cpu == "arm") {
35+
+ _suffix = "-arm-android"
36+
+ } else if (current_cpu == "arm64") {
37+
+ _suffix = "-aarch64-android"
38+
+ } else {
39+
+ assert(false) # Unhandled cpu type
40+
+ }
41+
+ }
42+
+
43+
_lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}"
44+
libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ]
45+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
--- a/build/config/rust.gni
2+
+++ b/build/config/rust.gni
3+
@@ -7,6 +7,8 @@
4+
import("//build/config/sanitizers/sanitizers.gni")
5+
import("//build/toolchain/toolchain.gni")
6+
7+
+import("//v8/gni/snapshot_toolchain.gni")
8+
+
9+
if (is_android) {
10+
import("//build/config/android/config.gni")
11+
}
12+
@@ -98,6 +100,8 @@
13+
# a platform. Mostly applicable to Windows, where new versions can handle ANSI
14+
# escape sequences but it's not reliable in general.
15+
force_rustc_color_output = false
16+
+
17+
+ custom_target_rust_abi_target = ""
18+
}
19+
20+
# Use a separate declare_args so these variables' defaults can depend on the
21+
@@ -165,7 +169,7 @@
22+
# TODO(crbug.com/1278030): To build unit tests for Android we need to build
23+
# them as a dylib and put them into an APK. We should reuse all the same logic
24+
# for gtests from the `//testing/test:test` template.
25+
-can_build_rust_unit_tests = toolchain_has_rust && !is_android
26+
+can_build_rust_unit_tests = toolchain_has_rust && !is_android && false
27+
28+
# We want to store rust_sysroot as a source-relative variable for ninja
29+
# portability. In practice if an external toolchain was specified, it might
30+
@@ -280,6 +284,12 @@
31+
}
32+
}
33+
34+
+if (!toolchain_for_rust_host_build_tools && current_toolchain != v8_snapshot_toolchain && current_toolchain != host_toolchain) {
35+
+ if (custom_target_rust_abi_target != "") {
36+
+ rust_abi_target = custom_target_rust_abi_target
37+
+ }
38+
+}
39+
+
40+
assert(!toolchain_has_rust || rust_abi_target != "")
41+
42+
# This variable is passed to the Rust libstd build.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--- a/build/config/c++/c++.gni
2+
+++ b/build/config/c++/c++.gni
3+
@@ -6,6 +6,8 @@
4+
import("//build/config/sanitizers/sanitizers.gni")
5+
import("//build_overrides/build.gni")
6+
7+
+import("//v8/gni/snapshot_toolchain.gni")
8+
+
9+
declare_args() {
10+
# Use in-tree libc++ (buildtools/third_party/libc++ and
11+
# buildtools/third_party/libc++abi) instead of the system C++ library for C++
12+
@@ -42,6 +44,8 @@
13+
14+
use_custom_libcxx =
15+
use_custom_libcxx || (use_custom_libcxx_for_host && !is_a_target_toolchain)
16+
+use_custom_libcxx =
17+
+ use_custom_libcxx || (use_custom_libcxx_for_host && current_toolchain == v8_snapshot_toolchain)
18+
use_custom_libcxx = use_custom_libcxx && !is_nacl
19+
20+
declare_args() {
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--- a/build/gn_run_binary.py
2+
+++ b/build/gn_run_binary.py
3+
@@ -23,7 +23,19 @@
4+
# The rest of the arguments are passed directly to the executable.
5+
args = [path] + sys.argv[2:]
6+
7+
-ret = subprocess.call(args)
8+
+# Modified by Termux: When building for termux, this wrapper will
9+
+# be used to run the binary which is built for host machine, using
10+
+# the rootfs provided by Google. We need to set LD_PRELOAD with
11+
+# libffi.so.7 as the host machine (Ubuntu 24.04) doesn't provide it.
12+
+envs = os.environ.copy()
13+
+if "./clang_x86_v8_arm/" in path or "./clang_x86/" in path:
14+
+ base_sysroot = os.path.join(os.path.dirname(__file__), "linux", "debian_bullseye_i386-sysroot")
15+
+ envs["LD_PRELOAD"] = base_sysroot + "/usr/lib/i386-linux-gnu/libffi.so.7"
16+
+elif "./host/" in path or "./clang_x64_v8_arm64/" in path or "./clang_x64/" in path:
17+
+ base_sysroot = os.path.join(os.path.dirname(__file__), "linux", "debian_bullseye_amd64-sysroot")
18+
+ envs["LD_PRELOAD"] = base_sysroot + "/usr/lib/x86_64-linux-gnu/libffi.so.7"
19+
+
20+
+ret = subprocess.call(args, env=envs)
21+
if ret != 0:
22+
if ret <= -100:
23+
# Windows error codes such as 0xC0000005 and 0xC0000409 are much easier to
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
This reverts https://github.com/chromium/chromium/commit/97c864b32a7f4d64f541e2b7bf9006d2f582082f
2+
3+
--- a/build/install-build-deps.py
4+
+++ b/build/install-build-deps.py
5+
@@ -388,8 +388,6 @@
6+
"libxtst6",
7+
"x11-utils",
8+
"x11-xserver-utils",
9+
- "xserver-xorg-core",
10+
- "xserver-xorg-video-dummy",
11+
"xvfb",
12+
"zlib1g",
13+
]
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
--- a/content/shell/app/shell_main_delegate.cc
2+
+++ b/content/shell/app/shell_main_delegate.cc
3+
@@ -90,6 +90,10 @@
4+
#include "content/shell/app/ios/shell_application_ios.h"
5+
#endif
6+
7+
+#ifdef __TERMUX__
8+
+#include "sandbox/policy/switches.h"
9+
+#endif
10+
+
11+
namespace {
12+
13+
#if !BUILDFLAG(IS_FUCHSIA)
14+
@@ -210,6 +214,15 @@
15+
base::CPU cpu_info;
16+
#endif
17+
18+
+// Disable sandbox on Termux.
19+
+#ifdef __TERMUX__
20+
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
21+
+ sandbox::policy::switches::kNoSandbox)) {
22+
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(
23+
+ sandbox::policy::switches::kNoSandbox);
24+
+ }
25+
+#endif
26+
+
27+
// Disable platform crash handling and initialize the crash reporter, if
28+
// requested.
29+
// TODO(crbug.com/1226159): Implement crash reporter integration for Fuchsia.
30+
--- a/chrome/browser/ui/startup/bad_flags_prompt.cc
31+
+++ b/chrome/browser/ui/startup/bad_flags_prompt.cc
32+
@@ -60,10 +60,12 @@
33+
static const char* kBadFlags[] = {
34+
network::switches::kIgnoreCertificateErrorsSPKIList,
35+
// These flags disable sandbox-related security.
36+
+#ifndef __TERMUX__
37+
sandbox::policy::switches::kDisableGpuSandbox,
38+
sandbox::policy::switches::kDisableSeccompFilterSandbox,
39+
sandbox::policy::switches::kDisableSetuidSandbox,
40+
sandbox::policy::switches::kNoSandbox,
41+
+#endif
42+
#if BUILDFLAG(IS_WIN)
43+
sandbox::policy::switches::kAllowThirdPartyModules,
44+
#endif
45+
--- a/chrome/app/chrome_main_delegate.cc
46+
+++ b/chrome/app/chrome_main_delegate.cc
47+
@@ -235,6 +235,10 @@
48+
#include "ui/gfx/switches.h"
49+
#endif
50+
51+
+#ifdef __TERMUX__
52+
+#include "sandbox/policy/switches.h"
53+
+#endif
54+
+
55+
base::LazyInstance<ChromeContentGpuClient>::DestructorAtExit
56+
g_chrome_content_gpu_client = LAZY_INSTANCE_INITIALIZER;
57+
base::LazyInstance<ChromeContentRendererClient>::DestructorAtExit
58+
@@ -1037,6 +1041,14 @@
59+
const base::CommandLine& command_line =
60+
*base::CommandLine::ForCurrentProcess();
61+
62+
+// Disable sandbox on Termux.
63+
+#ifdef __TERMUX__
64+
+ if (!command_line.HasSwitch(sandbox::policy::switches::kNoSandbox)) {
65+
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(
66+
+ sandbox::policy::switches::kNoSandbox);
67+
+ }
68+
+#endif
69+
+
70+
// Only allow disabling web security via the command-line flag if the user has
71+
// specified a distinct profile directory. This still enables tests to disable
72+
// web security by setting the kWebKitWebSecurityEnabled pref directly.
73+
--- a/content/shell/browser/shell_content_browser_client.cc
74+
+++ b/content/shell/browser/shell_content_browser_client.cc
75+
@@ -131,6 +131,10 @@
76+
#include "media/mojo/services/media_foundation_preferences.h"
77+
#endif // BUILDFLAG(IS_WIN)
78+
79+
+#ifdef __TERMUX__
80+
+#include "sandbox/policy/switches.h"
81+
+#endif
82+
+
83+
namespace content {
84+
85+
namespace {
86+
@@ -405,6 +409,9 @@
87+
// to shell_main.cc that it's a browser test.
88+
switches::kBrowserTest,
89+
#endif
90+
+#ifdef __TERMUX__
91+
+ sandbox::policy::switches::kNoSandbox
92+
+#endif
93+
switches::kCrashDumpsDir,
94+
switches::kEnableCrashReporter,
95+
switches::kExposeInternalsForTesting,

0 commit comments

Comments
 (0)