chromium: prepare for M140

This commit is contained in:
emilylange
2025-09-03 00:09:14 +02:00
parent f887ecd378
commit 12a28a2fc1
2 changed files with 39 additions and 15 deletions
@@ -477,10 +477,17 @@ let
# Rebased variant of patch to build M126+ with LLVM 17.
# staging-next will bump LLVM to 18, so we will be able to drop this soon.
./patches/chromium-126-llvm-17.patch
]
++ lib.optionals (!chromiumVersionAtLeast "140") [
# Partial revert of https://github.com/chromium/chromium/commit/3687976b0c6d36cf4157419a24a39f6770098d61
# allowing us to use our rustc and our clang.
./patches/chromium-129-rust.patch
]
++ lib.optionals (chromiumVersionAtLeast "140") [
# Rebased variant of the patch above due to
# https://chromium-review.googlesource.com/c/chromium/src/+/6665907
./patches/chromium-140-rust.patch
]
++ lib.optionals (!ungoogled && !chromiumVersionAtLeast "136") [
# Note: We since use LLVM v19.1+ on unstable *and* release-24.11 for all version and as such
# no longer need this patch. We opt to arbitrarily limit it to versions prior to M136 just
@@ -547,21 +554,17 @@ let
];
postPatch =
lib.optionalString (!isElectron)
# TODO: reuse mkGnFlags for this
(
if (chromiumVersionAtLeast "136") then
''
cp ${./files/gclient_args.gni} build/config/gclient_args.gni
chmod u+w build/config/gclient_args.gni
echo 'checkout_mutter = false' >> build/config/gclient_args.gni
echo 'checkout_glic_e2e_tests = false' >> build/config/gclient_args.gni
''
else
''
ln -s ${./files/gclient_args.gni} build/config/gclient_args.gni
''
)
# TODO: reuse mkGnFlags for this
# TODO: reflow
lib.optionalString (!isElectron) ''
cp ${./files/gclient_args.gni} build/config/gclient_args.gni
chmod u+w build/config/gclient_args.gni
echo 'checkout_mutter = false' >> build/config/gclient_args.gni
echo 'checkout_glic_e2e_tests = false' >> build/config/gclient_args.gni
''
+ lib.optionalString (!isElectron && chromiumVersionAtLeast "140") ''
echo 'checkout_clusterfuzz_data = false' >> build/config/gclient_args.gni
''
+ lib.optionalString (!isElectron) ''
echo 'LASTCHANGE=${upstream-info.DEPS."src".rev}-refs/tags/${version}@{#0}' > build/util/LASTCHANGE
@@ -0,0 +1,21 @@
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 77b02f76d2845fdf1a9429f704e59b8f7ab42993..e6ce3abe9872f415a9ef1cfc76f7267e7e44e1c9 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1917,16 +1917,6 @@ config("runtime_library") {
configs += [ "//build/config/c++:runtime_library" ]
}
- # Rust and C++ both provide intrinsics for LLVM to call for math operations. We
- # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
- # library. The Rust symbols are marked as weak, so that they can be replaced by
- # the C++ symbols. This config ensures the C++ symbols exist and are strong in
- # order to cause that replacement to occur by explicitly linking in clang's
- # compiler-rt library.
- if (is_clang && !is_cronet_build) {
- configs += [ "//build/config/clang:compiler_builtins" ]
- }
-
# TODO(crbug.com/40570904): Come up with a better name for is POSIX + Fuchsia
# configuration.
if (is_posix || is_fuchsia) {