diff --git a/meta-chromium/recipes-browser/chromium/chromium-gn.inc b/meta-chromium/recipes-browser/chromium/chromium-gn.inc index d1df2eae0..98716ad3a 100644 --- a/meta-chromium/recipes-browser/chromium/chromium-gn.inc +++ b/meta-chromium/recipes-browser/chromium/chromium-gn.inc @@ -27,6 +27,9 @@ SRC_URI += "\ file://0010-Don-t-require-profiler_builtins.rlib.patch \ file://0011-Disable-crabbyavif-to-fix-build-errors.patch \ file://0012-Revert-Allow-and-use-std-hardware_destructive_interf.patch \ + file://0013-Revert-Set-Rust-symbol-visibility-to-hidden-when-C-s.patch \ + file://0014-pdfium-Fix-missing-PDFiumAPIStringBufferAdapter-temp.patch \ + file://0015-Revert-Connect-the-Rust-log-crate-to-the-base-loggin.patch \ " # ARM/AArch64-specific patches. SRC_URI:append:aarch64 = "${@bb.utils.contains('TUNE_FEATURES', 'crypto', '', ' file://arm/0001-Fix-AES-crypto-SIGILL-on-rpi4-64.patch', d)}" diff --git a/meta-chromium/recipes-browser/chromium/chromium-ozone-wayland_131.0.6778.139.bb b/meta-chromium/recipes-browser/chromium/chromium-ozone-wayland_132.0.6834.83.bb similarity index 95% rename from meta-chromium/recipes-browser/chromium/chromium-ozone-wayland_131.0.6778.139.bb rename to meta-chromium/recipes-browser/chromium/chromium-ozone-wayland_132.0.6834.83.bb index cffae3d29..b18c9782e 100644 --- a/meta-chromium/recipes-browser/chromium/chromium-ozone-wayland_131.0.6778.139.bb +++ b/meta-chromium/recipes-browser/chromium/chromium-ozone-wayland_132.0.6834.83.bb @@ -20,7 +20,6 @@ GN_ARGS += "\ use_system_wayland_scanner=true \ use_xkbcommon=true \ use_system_minigbm=true \ - use_system_libdrm=true \ use_system_libffi=true \ use_gtk=false \ " diff --git a/meta-chromium/recipes-browser/chromium/chromium-x11_131.0.6778.139.bb b/meta-chromium/recipes-browser/chromium/chromium-x11_132.0.6834.83.bb similarity index 100% rename from meta-chromium/recipes-browser/chromium/chromium-x11_131.0.6778.139.bb rename to meta-chromium/recipes-browser/chromium/chromium-x11_132.0.6834.83.bb diff --git a/meta-chromium/recipes-browser/chromium/chromium.inc b/meta-chromium/recipes-browser/chromium/chromium.inc index 28dafd9b0..4b003cd4a 100644 --- a/meta-chromium/recipes-browser/chromium/chromium.inc +++ b/meta-chromium/recipes-browser/chromium/chromium.inc @@ -4,7 +4,7 @@ HOMEPAGE = "https://www.chromium.org/Home" CVE_PRODUCT = "chromium:chromium google:chrome" SRC_URI = "https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV}.tar.xz" -SRC_URI[sha256sum] = "5d12ffc2a33027bde1b15998b28f48560647f1196ecca068ba8cde6bd68f8c9f" +SRC_URI[sha256sum] = "f98315eacbf3be106feca37f8243d8c4092d4fd832c918aa36dc229eb6ab39e0" S = "${WORKDIR}/chromium-${PV}" @@ -95,15 +95,17 @@ LIC_FILES_CHKSUM = "\ file://${S}/third_party/android_deps/libs/com_android_support_support_annotations/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ file://${S}/third_party/android_deps/libs/com_google_android_annotations/LICENSE;md5=7f7d74108ee1b7a743cca7d9a86784d6 \ file://${S}/third_party/android_deps/libs/com_google_android_datatransport_transport_api/LICENSE;md5=7f7d74108ee1b7a743cca7d9a86784d6 \ - file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_auth/LICENSE;md5=b8c82a390fc5a5bba473726868fc5e5d \ - file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_auth_api_phone/LICENSE;md5=5c9317538bd492b4fd01eec9d6972640 \ - file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_auth_base/LICENSE;md5=b8c82a390fc5a5bba473726868fc5e5d \ + file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_auth/LICENSE;md5=c342c84a7fac9459603b5f30a5a93723 \ + file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_auth_api_phone/LICENSE;md5=e5a8d882f7945961271786002e6a581d \ + file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_auth_base/LICENSE;md5=d1680c9b9927e21a8e831e443964c3ff \ + file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_auth_blockstore/LICENSE;md5=fff98c651a1ae8a04462a12f8ea1f7a4 \ file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_base/LICENSE;md5=e5a8d882f7945961271786002e6a581d \ file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_basement/LICENSE;md5=e5a8d882f7945961271786002e6a581d \ file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_cast/LICENSE;md5=1e61529f08860f8fa1c90bf8af8007ff \ file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_cast_framework/LICENSE;md5=6688c3d596b2e35dd1928d1ffdf5a9e2 \ file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_clearcut/LICENSE;md5=32c019d8c1f8222a8aad9c3e1f1d2d10 \ file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_cloud_messaging/LICENSE;md5=fb1c3d71ca3681654ec1604b10fc1ace \ + file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_fido/LICENSE;md5=ff76e1f91bd64c4593743be9d83a4c5f \ file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_flags/LICENSE;md5=92b728c587a67a1b9577e9ca141ca520 \ file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_gcm/LICENSE;md5=92b728c587a67a1b9577e9ca141ca520 \ file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_identity_credentials/LICENSE;md5=fff98c651a1ae8a04462a12f8ea1f7a4 \ @@ -115,6 +117,7 @@ LIC_FILES_CHKSUM = "\ file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_tasks/LICENSE;md5=e5a8d882f7945961271786002e6a581d \ file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_vision/LICENSE;md5=d332b0f8bf5e67cef70541572ba69b61 \ file://${S}/third_party/android_deps/libs/com_google_android_gms_play_services_vision_common/LICENSE;md5=d332b0f8bf5e67cef70541572ba69b61 \ + file://${S}/third_party/android_deps/libs/com_google_android_libraries_identity_googleid_googleid/LICENSE;md5=498e555b4ebef5399d944fb662c61913 \ file://${S}/third_party/android_deps/libs/com_google_android_material_material/LICENSE;md5=7f7d74108ee1b7a743cca7d9a86784d6 \ file://${S}/third_party/android_deps/libs/com_google_android_play_core_common/LICENSE;md5=8194dd288cb886b87752b09da8cd9287 \ file://${S}/third_party/android_deps/libs/com_google_android_play_feature_delivery/LICENSE;md5=f2f92822aef2474358b9e1d21514e278 \ @@ -316,7 +319,6 @@ LIC_FILES_CHKSUM = "\ file://${S}/third_party/libaddressinput/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ file://${S}/third_party/libaom/source/libaom/LICENSE;md5=6ea91368c1bbdf877159435572b931f5 \ file://${S}/third_party/libavif/LICENSE;md5=15744a27d810133340dc64ad411ec4cd \ - file://${S}/third_party/libavifinfo/LICENSE;md5=53f555cbaaac3922d962dfbe473a8213 \ file://${S}/third_party/libbrlapi/LICENSE;md5=fad9b3332be894bab9bc501572864b29 \ file://${S}/third_party/libc++/src/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da3953 \ file://${S}/third_party/libc++abi/src/LICENSE.TXT;md5=7b9334635b542c56868400a46b272b1e \ @@ -333,6 +335,7 @@ LIC_FILES_CHKSUM = "\ file://${S}/third_party/libsecret/LICENSE;md5=23c2a5e0106b99d75238986559bb5fc6 \ file://${S}/third_party/libsrtp/LICENSE;md5=2909fcf6f09ffff8430463d91c08c4e1 \ file://${S}/third_party/libsync/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ + file://${S}/third_party/libtess2/LICENSE;md5=0788a91aa827d68f447dc011ed64727e \ file://${S}/third_party/libunwind/src/LICENSE.TXT;md5=f66970035d12f196030658b11725e1a1 \ file://${S}/third_party/liburlpattern/LICENSE;md5=5be7cac9f8920c488c4dda56dbfeaec2 \ file://${S}/third_party/libusb/src/COPYING;md5=fbc093901857fcd118f065f900982c24 \ @@ -347,6 +350,7 @@ LIC_FILES_CHKSUM = "\ file://${S}/third_party/libyuv/LICENSE;md5=464282cfb405b005b9637f11103a7325 \ file://${S}/third_party/libzip/LICENSE;md5=6bb2408fd544544b86946e67ec2da9a0 \ file://${S}/third_party/lit/LICENSE;md5=4b390b7b932ca7872d1de2c834797cad \ + file://${S}/third_party/llvm-libc/src/LICENSE.TXT;md5=ff42885ed2ab98f1ecb8c1fc41205343 \ file://${S}/third_party/lottie/LICENSE;md5=827837648055a0bfb7782b91ab42eed1 \ file://${S}/third_party/lss/LICENSE;md5=dcd794613f580ae04e9633662024c7a2 \ file://${S}/third_party/lzma_sdk/LICENSE;md5=eceed1d308734c8051664bc3d1ca175e \ diff --git a/meta-chromium/recipes-browser/chromium/files/0001-Drop-GN-compiler-settings-conflicting-with-OE.patch b/meta-chromium/recipes-browser/chromium/files/0001-Drop-GN-compiler-settings-conflicting-with-OE.patch index de107fa4d..ea996acef 100644 --- a/meta-chromium/recipes-browser/chromium/files/0001-Drop-GN-compiler-settings-conflicting-with-OE.patch +++ b/meta-chromium/recipes-browser/chromium/files/0001-Drop-GN-compiler-settings-conflicting-with-OE.patch @@ -1,4 +1,4 @@ -From b49388c4ee899f7a424a1f1df52868eed1e9c83f Mon Sep 17 00:00:00 2001 +From 2e867ac9e97b5ae2090b4de212d9c0e50eee653b Mon Sep 17 00:00:00 2001 From: Max Ihlenfeldt Date: Tue, 25 Jun 2024 11:06:19 +0000 Subject: [PATCH] Drop GN compiler settings conflicting with OE @@ -15,20 +15,19 @@ Upstream-Status: Inappropriate [OE-Specific] Signed-off-by: Khem Raj Signed-off-by: Max Ihlenfeldt --- - build/config/compiler/BUILD.gn | 48 ---------------------------------- - 1 file changed, 48 deletions(-) + build/config/compiler/BUILD.gn | 46 ---------------------------------- + 1 file changed, 46 deletions(-) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index f162751..356a8d4 100644 +index f58320b88f..309c3078a2 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -1219,27 +1219,6 @@ config("compiler_cpu_abi") { +@@ -1240,26 +1240,6 @@ config("compiler_cpu_abi") { "-msse3", ] } - } else if (current_cpu == "arm") { -- if (is_clang && !is_android && !is_nacl && -- !(is_chromeos_lacros && is_chromeos_device)) { +- if (is_clang && !is_android && !is_nacl && !is_chromeos_device) { - cflags += [ "--target=arm-linux-gnueabihf" ] - ldflags += [ "--target=arm-linux-gnueabihf" ] - } @@ -43,14 +42,14 @@ index f162751..356a8d4 100644 - } - } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_nacl && !is_fuchsia && -- !(is_chromeos_lacros && is_chromeos_device)) { +- !is_chromeos_device) { - cflags += [ "--target=aarch64-linux-gnu" ] - ldflags += [ "--target=aarch64-linux-gnu" ] - } } else if (current_cpu == "mipsel" && !is_nacl) { ldflags += [ "-Wl,--hash-style=sysv" ] if (custom_toolchain == "") { -@@ -1247,9 +1226,6 @@ config("compiler_cpu_abi") { +@@ -1267,9 +1247,6 @@ config("compiler_cpu_abi") { if (is_android) { cflags += [ "--target=mipsel-linux-android" ] ldflags += [ "--target=mipsel-linux-android" ] @@ -60,7 +59,7 @@ index f162751..356a8d4 100644 } } else { cflags += [ "-EL" ] -@@ -1329,8 +1305,6 @@ config("compiler_cpu_abi") { +@@ -1349,8 +1326,6 @@ config("compiler_cpu_abi") { ldflags += [ "-Wl,--hash-style=sysv" ] if (custom_toolchain == "") { if (is_clang) { @@ -69,17 +68,16 @@ index f162751..356a8d4 100644 } else { cflags += [ "-EB" ] ldflags += [ "-EB" ] -@@ -1378,9 +1352,6 @@ config("compiler_cpu_abi") { - if (is_android) { +@@ -1399,8 +1374,6 @@ config("compiler_cpu_abi") { cflags += [ "--target=mips64el-linux-android" ] ldflags += [ "--target=mips64el-linux-android" ] -- } else { + } else { - cflags += [ "--target=mips64el-linux-gnuabi64" ] - ldflags += [ "--target=mips64el-linux-gnuabi64" ] } } else { cflags += [ -@@ -1438,8 +1409,6 @@ config("compiler_cpu_abi") { +@@ -1458,8 +1431,6 @@ config("compiler_cpu_abi") { ldflags += [ "-Wl,--hash-style=sysv" ] if (custom_toolchain == "") { if (is_clang) { @@ -88,7 +86,7 @@ index f162751..356a8d4 100644 } else { cflags += [ "-EB", -@@ -1608,23 +1577,6 @@ config("compiler_deterministic") { +@@ -1628,23 +1599,6 @@ config("compiler_deterministic") { } } } diff --git a/meta-chromium/recipes-browser/chromium/files/0002-v8-qemu-wrapper.patch b/meta-chromium/recipes-browser/chromium/files/0002-v8-qemu-wrapper.patch index f61d3eed6..080de6e16 100644 --- a/meta-chromium/recipes-browser/chromium/files/0002-v8-qemu-wrapper.patch +++ b/meta-chromium/recipes-browser/chromium/files/0002-v8-qemu-wrapper.patch @@ -1,4 +1,4 @@ -From 733559e6f2c26ccbce97354a2341b14c63563dab Mon Sep 17 00:00:00 2001 +From 60233d0570b4c9c9a9827616b224c9c93cbf6254 Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Tue, 7 Nov 2017 15:24:32 +0100 Subject: [PATCH] v8: qemu wrapper @@ -17,7 +17,7 @@ Signed-off-by: Maksim Sisov 2 files changed, 5 insertions(+) diff --git a/tools/v8_context_snapshot/BUILD.gn b/tools/v8_context_snapshot/BUILD.gn -index f46bec2..5438365 100644 +index f46bec2eb5..54383655c0 100644 --- a/tools/v8_context_snapshot/BUILD.gn +++ b/tools/v8_context_snapshot/BUILD.gn @@ -45,6 +45,7 @@ if (use_v8_context_snapshot) { @@ -29,10 +29,10 @@ index f46bec2..5438365 100644 "root_out_dir") + "/v8_context_snapshot_generator", diff --git a/v8/BUILD.gn b/v8/BUILD.gn -index 38a9a9a..367c354 100644 +index 0c559713ea..c8c95eb3a9 100644 --- a/v8/BUILD.gn +++ b/v8/BUILD.gn -@@ -2265,6 +2265,7 @@ template("run_torque") { +@@ -2274,6 +2274,7 @@ template("run_torque") { } args = [ @@ -40,7 +40,7 @@ index 38a9a9a..367c354 100644 "./" + rebase_path( get_label_info(":torque($toolchain)", "root_out_dir") + "/torque", root_build_dir), -@@ -2428,6 +2429,7 @@ action("generate_bytecode_builtins_list") { +@@ -2437,6 +2438,7 @@ action("generate_bytecode_builtins_list") { outputs = [ "$target_gen_dir/builtins-generated/bytecodes-builtins-list.h" ] deps = [ ":bytecode_builtins_list_generator($v8_generator_toolchain)" ] args = [ @@ -48,7 +48,7 @@ index 38a9a9a..367c354 100644 "./" + rebase_path( get_label_info( ":bytecode_builtins_list_generator($v8_generator_toolchain)", -@@ -2500,6 +2502,7 @@ template("run_mksnapshot") { +@@ -2509,6 +2511,7 @@ template("run_mksnapshot") { } args += [ @@ -56,7 +56,7 @@ index 38a9a9a..367c354 100644 "./" + rebase_path(get_label_info(":mksnapshot($v8_snapshot_toolchain)", "root_out_dir") + "/mksnapshot", root_build_dir), -@@ -7446,6 +7449,7 @@ if (v8_enable_i18n_support) { +@@ -7451,6 +7454,7 @@ if (v8_enable_i18n_support) { outputs = [ output_file ] args = [ diff --git a/meta-chromium/recipes-browser/chromium/files/0003-wrapper-extra-flags.patch b/meta-chromium/recipes-browser/chromium/files/0003-wrapper-extra-flags.patch index 593d0dd99..56493bbc4 100644 --- a/meta-chromium/recipes-browser/chromium/files/0003-wrapper-extra-flags.patch +++ b/meta-chromium/recipes-browser/chromium/files/0003-wrapper-extra-flags.patch @@ -1,4 +1,4 @@ -From 1d75677445177bc9c16bb7d0fae607d0c5e82c0a Mon Sep 17 00:00:00 2001 +From 71eca88e5d42d4732dfe53ea8fadf2199db519a2 Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Wed, 8 Nov 2017 16:43:47 +0100 Subject: [PATCH] wrapper: extra flags @@ -15,7 +15,7 @@ Signed-off-by: Raphael Kubo da Costa 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/installer/linux/common/wrapper b/chrome/installer/linux/common/wrapper -index aaa46bf..7d8c8dd 100755 +index aaa46bf71f..7d8c8dd5fb 100755 --- a/chrome/installer/linux/common/wrapper +++ b/chrome/installer/linux/common/wrapper @@ -36,5 +36,7 @@ exec < /dev/null diff --git a/meta-chromium/recipes-browser/chromium/files/0004-Delete-compiler-options-not-available-in-release-ver.patch b/meta-chromium/recipes-browser/chromium/files/0004-Delete-compiler-options-not-available-in-release-ver.patch index 8d7aaf65a..1b3e23dcb 100644 --- a/meta-chromium/recipes-browser/chromium/files/0004-Delete-compiler-options-not-available-in-release-ver.patch +++ b/meta-chromium/recipes-browser/chromium/files/0004-Delete-compiler-options-not-available-in-release-ver.patch @@ -1,22 +1,45 @@ -From 2b487585ebe8986ada07afb9c917564c9b0dfd16 Mon Sep 17 00:00:00 2001 +From fc3a1af7d8d6ed6bc54d096e72cbf3d35ff4fa97 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 4 Dec 2019 19:06:54 -0800 Subject: [PATCH] Delete compiler options not available in release versions of clang _yet_ +* CREL feature is not supported on the current clang toolchain version, + which causes build to fail with the following error: + +| clang++: error: unsupported argument '--crel' to option '-Wa,' +| clang++: error: unsupported argument '--allow-experimental-crel' + to option '-Wa,' + Upstream-Status: Inappropriate [ clang/master already supports them ] Signed-off-by: Khem Raj Signed-off-by: Randy MacLeod +Signed-off-by: Ariel D'Alessandro --- - build/config/compiler/BUILD.gn | 5 +++++ - 1 file changed, 5 insertions(+) + build/config/compiler/BUILD.gn | 13 +++++-------- + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index 356a8d4..e348888 100644 +index 309c3078a2647..5eeb241fc9038 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -1902,6 +1902,11 @@ config("default_warnings") { +@@ -615,14 +615,6 @@ config("compiler") { + } else { + cflags += [ "-ffp-contract=off" ] + } +- +- # 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" && +- default_toolchain != "//build/toolchain/cros:target") { +- cflags += [ "-Wa,--crel,--allow-experimental-crel" ] +- } + } + + # C11/C++11 compiler flags setup. +@@ -1924,6 +1916,11 @@ config("default_warnings") { } cflags += [ diff --git a/meta-chromium/recipes-browser/chromium/files/0005-avoid-link-latomic-failure-on-CentOS-8-host.patch b/meta-chromium/recipes-browser/chromium/files/0005-avoid-link-latomic-failure-on-CentOS-8-host.patch index 7533600a5..9a4359307 100644 --- a/meta-chromium/recipes-browser/chromium/files/0005-avoid-link-latomic-failure-on-CentOS-8-host.patch +++ b/meta-chromium/recipes-browser/chromium/files/0005-avoid-link-latomic-failure-on-CentOS-8-host.patch @@ -1,4 +1,4 @@ -From 0dcae7668b878b7db5da83643a8dfd7709865d3b Mon Sep 17 00:00:00 2001 +From c68f4f68490005e1576ca2339b1124dca5f83867 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Fri, 22 Jan 2021 00:02:25 +0800 Subject: [PATCH] avoid link latomic failure on CentOS 8 host @@ -18,10 +18,10 @@ Signed-off-by: Randy MacLeod 2 files changed, 4 insertions(+) diff --git a/base/BUILD.gn b/base/BUILD.gn -index 4c0e464..1cf04ea 100644 +index 5dee8a9226..bc3e57164a 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -1097,7 +1097,9 @@ component("base") { +@@ -1077,7 +1077,9 @@ component("base") { # Needed for if using newer C++ library than sysroot, except if # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. @@ -32,7 +32,7 @@ index 4c0e464..1cf04ea 100644 libs += [ "atomic" ] } diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn -index 131bb71..20f918a 100644 +index 131bb71d1d..20f918ab82 100644 --- a/build/config/linux/BUILD.gn +++ b/build/config/linux/BUILD.gn @@ -40,7 +40,9 @@ config("runtime_library") { diff --git a/meta-chromium/recipes-browser/chromium/files/0006-Don-t-pass-unknown-LLVM-options.patch b/meta-chromium/recipes-browser/chromium/files/0006-Don-t-pass-unknown-LLVM-options.patch index b9875ca54..4c9bf722a 100644 --- a/meta-chromium/recipes-browser/chromium/files/0006-Don-t-pass-unknown-LLVM-options.patch +++ b/meta-chromium/recipes-browser/chromium/files/0006-Don-t-pass-unknown-LLVM-options.patch @@ -1,4 +1,4 @@ -From e7bfb246447a1c2a6249c20f0a006ad1578def01 Mon Sep 17 00:00:00 2001 +From 651736ea42939ae67169d3429489ae9f304eae3c Mon Sep 17 00:00:00 2001 From: Max Ihlenfeldt Date: Fri, 8 Dec 2023 11:47:43 +0000 Subject: [PATCH] Don't pass unknown LLVM options @@ -17,10 +17,10 @@ Signed-off-by: Max Ihlenfeldt 1 file changed, 18 deletions(-) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index e348888..a47fbdb 100644 +index 8951f6006c..cc300e7122 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -584,24 +584,6 @@ config("compiler") { +@@ -591,24 +591,6 @@ config("compiler") { } } diff --git a/meta-chromium/recipes-browser/chromium/files/0007-Fix-constexpr-variable-must-be-initialized-by-a-cons.patch b/meta-chromium/recipes-browser/chromium/files/0007-Fix-constexpr-variable-must-be-initialized-by-a-cons.patch index fc7da4265..46aec8a3d 100644 --- a/meta-chromium/recipes-browser/chromium/files/0007-Fix-constexpr-variable-must-be-initialized-by-a-cons.patch +++ b/meta-chromium/recipes-browser/chromium/files/0007-Fix-constexpr-variable-must-be-initialized-by-a-cons.patch @@ -1,4 +1,4 @@ -From 4316b426cf10afb28ce42c250fbde66266ac5114 Mon Sep 17 00:00:00 2001 +From 5a28cb783a33391476839a5b904f0eab7fb9b13d Mon Sep 17 00:00:00 2001 From: Max Ihlenfeldt Date: Fri, 22 Mar 2024 10:43:47 +0000 Subject: [PATCH] Fix "constexpr variable must be initialized by a constant @@ -14,7 +14,7 @@ Signed-off-by: Max Ihlenfeldt 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/autofill/core/browser/data_model/autofill_i18n_api.h b/components/autofill/core/browser/data_model/autofill_i18n_api.h -index fa1a06b..8e1fe01 100644 +index fa1a06bdad..8e1fe01bfc 100644 --- a/components/autofill/core/browser/data_model/autofill_i18n_api.h +++ b/components/autofill/core/browser/data_model/autofill_i18n_api.h @@ -16,8 +16,8 @@ namespace autofill::i18n_model_definition { diff --git a/meta-chromium/recipes-browser/chromium/files/0008-Use-the-correct-path-to-libclang_rt.builtins.a.patch b/meta-chromium/recipes-browser/chromium/files/0008-Use-the-correct-path-to-libclang_rt.builtins.a.patch index 44f8828c4..421758343 100644 --- a/meta-chromium/recipes-browser/chromium/files/0008-Use-the-correct-path-to-libclang_rt.builtins.a.patch +++ b/meta-chromium/recipes-browser/chromium/files/0008-Use-the-correct-path-to-libclang_rt.builtins.a.patch @@ -1,4 +1,4 @@ -From 334f64aafb062324a9124a13855128dfe733c0c2 Mon Sep 17 00:00:00 2001 +From b9b4dffd99fd57dc3acbce7304284c26a10e695e Mon Sep 17 00:00:00 2001 From: Max Ihlenfeldt Date: Tue, 19 Dec 2023 12:14:05 +0000 Subject: [PATCH] Use the correct path to libclang_rt.builtins.a @@ -21,10 +21,10 @@ Signed-off-by: Max Ihlenfeldt 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn -index 890bf91..ed90f6e 100644 +index 44bd202d2b..6789beccdc 100644 --- a/build/config/clang/BUILD.gn +++ b/build/config/clang/BUILD.gn -@@ -163,14 +163,15 @@ template("clang_lib") { +@@ -166,14 +166,15 @@ template("clang_lib") { } else if (is_apple) { _dir = "darwin" } else if (is_linux || is_chromeos) { diff --git a/meta-chromium/recipes-browser/chromium/files/0009-Adjust-the-Rust-build-to-our-needs.patch b/meta-chromium/recipes-browser/chromium/files/0009-Adjust-the-Rust-build-to-our-needs.patch index 8aa32876f..495a56ada 100644 --- a/meta-chromium/recipes-browser/chromium/files/0009-Adjust-the-Rust-build-to-our-needs.patch +++ b/meta-chromium/recipes-browser/chromium/files/0009-Adjust-the-Rust-build-to-our-needs.patch @@ -23,10 +23,10 @@ Signed-off-by: Max Ihlenfeldt 4 files changed, 52 insertions(+), 19 deletions(-) diff --git a/build/config/rust.gni b/build/config/rust.gni -index 5b7807a..2a7802f 100644 +index 60856e609d..4baeaecb9c 100644 --- a/build/config/rust.gni +++ b/build/config/rust.gni -@@ -97,6 +97,11 @@ declare_args() { +@@ -102,6 +102,11 @@ declare_args() { # a platform. Mostly applicable to Windows, where new versions can handle ANSI # escape sequences but it's not reliable in general. force_rustc_color_output = false @@ -37,8 +37,8 @@ index 5b7807a..2a7802f 100644 + rust_target_triple_vendor_for_target = "" } - # Use a separate declare_args so these variables' defaults can depend on the -@@ -197,14 +202,21 @@ if (enable_rust) { + # Use the Rust toolchain built in-tree. When false, we use the prebuilt Rust +@@ -174,14 +179,21 @@ if (enable_rust) { # https://issues.chromium.org/u/1/issues/372512092#comment5 for an example. rust_abi_target = "" if (is_linux || is_chromeos) { @@ -63,7 +63,7 @@ index 5b7807a..2a7802f 100644 cargo_target_abi = "" } else if (current_cpu == "arm") { if (arm_float_abi == "hard") { -@@ -214,18 +226,18 @@ if (is_linux || is_chromeos) { +@@ -191,18 +203,18 @@ if (is_linux || is_chromeos) { } if (arm_arch == "armv7-a" || arm_arch == "armv7") { # No way to inform Rust about the -a suffix. @@ -87,7 +87,7 @@ index 5b7807a..2a7802f 100644 } } else if (is_android) { diff --git a/build/rust/rustc_wrapper.py b/build/rust/rustc_wrapper.py -index 8f2096d..de43d44 100755 +index 8f2096dfe5..de43d44eed 100755 --- a/build/rust/rustc_wrapper.py +++ b/build/rust/rustc_wrapper.py @@ -160,6 +160,7 @@ def main(): @@ -99,10 +99,10 @@ index 8f2096d..de43d44 100755 abs_build_root = os.getcwd().replace('\\', '/') + '/' is_windows = sys.platform == 'win32' or args.target_windows diff --git a/build/rust/std/BUILD.gn b/build/rust/std/BUILD.gn -index 38e5ab7..136d06b 100644 +index b5f5291283..9619dccc45 100644 --- a/build/rust/std/BUILD.gn +++ b/build/rust/std/BUILD.gn -@@ -192,7 +192,8 @@ if (toolchain_has_rust) { +@@ -191,7 +191,8 @@ if (toolchain_has_rust) { # our locally-built std. Both reside in root_out_dir: we must only have one of # each per GN toolchain anyway. @@ -112,7 +112,7 @@ index 38e5ab7..136d06b 100644 if (!rust_prebuilt_stdlib) { local_rustc_sysroot = "$root_out_dir/local_rustc_sysroot" -@@ -321,12 +322,12 @@ if (toolchain_has_rust) { +@@ -320,12 +321,12 @@ if (toolchain_has_rust) { rust_abi_target, ] @@ -128,7 +128,7 @@ index 38e5ab7..136d06b 100644 } visibility = [ ":*" ] -@@ -339,8 +340,18 @@ if (toolchain_has_rust) { +@@ -338,8 +339,18 @@ if (toolchain_has_rust) { "enable_rust=false") deps = [ ":find_stdlib" ] sources = get_target_outputs(":find_stdlib") @@ -149,7 +149,7 @@ index 38e5ab7..136d06b 100644 visibility = [ ":*" ] } -@@ -380,7 +391,10 @@ if (toolchain_has_rust) { +@@ -379,7 +390,10 @@ if (toolchain_has_rust) { ":prebuilt_stdlib_libs", ":stdlib_public_dependent_libs", ] @@ -162,7 +162,7 @@ index 38e5ab7..136d06b 100644 # The host builds tools toolchain supports Rust only and does not use # the allocator remapping to point it to PartitionAlloc. diff --git a/build/rust/std/find_std_rlibs.py b/build/rust/std/find_std_rlibs.py -index 386258f..e8fdaa9 100755 +index 386258f890..e8fdaa904a 100755 --- a/build/rust/std/find_std_rlibs.py +++ b/build/rust/std/find_std_rlibs.py @@ -17,7 +17,7 @@ import re diff --git a/meta-chromium/recipes-browser/chromium/files/0010-Don-t-require-profiler_builtins.rlib.patch b/meta-chromium/recipes-browser/chromium/files/0010-Don-t-require-profiler_builtins.rlib.patch index 8c52978e6..fa15e7d6a 100644 --- a/meta-chromium/recipes-browser/chromium/files/0010-Don-t-require-profiler_builtins.rlib.patch +++ b/meta-chromium/recipes-browser/chromium/files/0010-Don-t-require-profiler_builtins.rlib.patch @@ -1,4 +1,4 @@ -From 7f9a0877029aa3492fd381313886d9c80efbb752 Mon Sep 17 00:00:00 2001 +From d6862d22d64ddb3e1b85c086eb8c14e69450ceb0 Mon Sep 17 00:00:00 2001 From: Max Ihlenfeldt Date: Wed, 7 Feb 2024 11:58:30 +0000 Subject: [PATCH] Don't require profiler_builtins.rlib @@ -14,7 +14,7 @@ Signed-off-by: Max Ihlenfeldt 1 file changed, 1 deletion(-) diff --git a/build/rust/std/BUILD.gn b/build/rust/std/BUILD.gn -index 38e5ab7..b5f5291 100644 +index 38e5ab7645..b5f5291283 100644 --- a/build/rust/std/BUILD.gn +++ b/build/rust/std/BUILD.gn @@ -100,7 +100,6 @@ if (toolchain_has_rust) { diff --git a/meta-chromium/recipes-browser/chromium/files/0011-Disable-crabbyavif-to-fix-build-errors.patch b/meta-chromium/recipes-browser/chromium/files/0011-Disable-crabbyavif-to-fix-build-errors.patch index bbf7b8c4d..cdd4e27a1 100644 --- a/meta-chromium/recipes-browser/chromium/files/0011-Disable-crabbyavif-to-fix-build-errors.patch +++ b/meta-chromium/recipes-browser/chromium/files/0011-Disable-crabbyavif-to-fix-build-errors.patch @@ -1,4 +1,4 @@ -From 71b62beb9ca61c0578508dea85e5db094ee05abc Mon Sep 17 00:00:00 2001 +From a51bea5534076916587c4bebc2299d7881d6fad7 Mon Sep 17 00:00:00 2001 From: Max Ihlenfeldt Date: Mon, 5 Aug 2024 09:33:42 +0000 Subject: [PATCH] Disable crabbyavif to fix build errors @@ -18,10 +18,10 @@ Signed-off-by: Max Ihlenfeldt 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/third_party/blink/renderer/platform/image-decoders/BUILD.gn b/third_party/blink/renderer/platform/image-decoders/BUILD.gn -index 6668b18..761c5fe 100644 +index 6dbddaa2e3..2b5f660196 100644 --- a/third_party/blink/renderer/platform/image-decoders/BUILD.gn +++ b/third_party/blink/renderer/platform/image-decoders/BUILD.gn -@@ -76,12 +76,9 @@ component("image_decoders") { +@@ -82,12 +82,9 @@ component("image_decoders") { sources += [ "avif/avif_image_decoder.cc", "avif/avif_image_decoder.h", @@ -32,9 +32,9 @@ index 6668b18..761c5fe 100644 deps += [ - "//third_party/crabbyavif", "//third_party/libavif", - "//third_party/libavifinfo", ] -@@ -123,9 +120,6 @@ source_set("unit_tests") { + } +@@ -136,9 +133,6 @@ source_set("unit_tests") { } if (enable_av1_decoder) { @@ -46,10 +46,10 @@ index 6668b18..761c5fe 100644 } } diff --git a/third_party/blink/renderer/platform/image-decoders/image_decoder.cc b/third_party/blink/renderer/platform/image-decoders/image_decoder.cc -index f208b65..4fb788f 100644 +index bdbbe08142..8b08f320cd 100644 --- a/third_party/blink/renderer/platform/image-decoders/image_decoder.cc +++ b/third_party/blink/renderer/platform/image-decoders/image_decoder.cc -@@ -36,7 +36,6 @@ +@@ -37,7 +37,6 @@ #include "media/media_buildflags.h" #include "skia/ext/cicp.h" #include "third_party/blink/public/common/buildflags.h" @@ -57,7 +57,7 @@ index f208b65..4fb788f 100644 #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_decoder.h" #include "third_party/blink/renderer/platform/image-decoders/fast_shared_buffer_reader.h" -@@ -52,7 +51,6 @@ +@@ -53,7 +52,6 @@ #if BUILDFLAG(ENABLE_AV1_DECODER) #include "third_party/blink/renderer/platform/image-decoders/avif/avif_image_decoder.h" @@ -65,7 +65,7 @@ index f208b65..4fb788f 100644 #endif namespace blink { -@@ -197,9 +195,7 @@ String SniffMimeTypeInternal(scoped_refptr reader) { +@@ -198,9 +196,7 @@ String SniffMimeTypeInternal(scoped_refptr reader) { return "image/bmp"; } #if BUILDFLAG(ENABLE_AV1_DECODER) @@ -76,22 +76,22 @@ index f208b65..4fb788f 100644 return "image/avif"; } #endif -@@ -309,15 +305,9 @@ std::unique_ptr ImageDecoder::CreateByMimeType( +@@ -310,15 +306,9 @@ std::unique_ptr ImageDecoder::CreateByMimeType( max_decoded_bytes); #if BUILDFLAG(ENABLE_AV1_DECODER) } else if (mime_type == "image/avif") { - if (base::FeatureList::IsEnabled(blink::features::kCrabbyAvif)) { - decoder = std::make_unique( - alpha_option, high_bit_depth_decoding_option, color_behavior, -- max_decoded_bytes, animation_option); +- aux_image, max_decoded_bytes, animation_option); - } else { - decoder = std::make_unique( - alpha_option, high_bit_depth_decoding_option, color_behavior, -- max_decoded_bytes, animation_option); +- aux_image, max_decoded_bytes, animation_option); - } + decoder = std::make_unique( + alpha_option, high_bit_depth_decoding_option, color_behavior, -+ max_decoded_bytes, animation_option); ++ aux_image, max_decoded_bytes, animation_option); #endif } diff --git a/meta-chromium/recipes-browser/chromium/files/0012-Revert-Allow-and-use-std-hardware_destructive_interf.patch b/meta-chromium/recipes-browser/chromium/files/0012-Revert-Allow-and-use-std-hardware_destructive_interf.patch index 78c112d7b..c9a94ffd5 100644 --- a/meta-chromium/recipes-browser/chromium/files/0012-Revert-Allow-and-use-std-hardware_destructive_interf.patch +++ b/meta-chromium/recipes-browser/chromium/files/0012-Revert-Allow-and-use-std-hardware_destructive_interf.patch @@ -1,4 +1,4 @@ -From c39e22626372eef009bac036c3758dc34e7bcdc9 Mon Sep 17 00:00:00 2001 +From 5f8558eedf059e4711d234e6da0413ab26b86334 Mon Sep 17 00:00:00 2001 From: Max Ihlenfeldt Date: Mon, 21 Oct 2024 10:08:17 +0000 Subject: [PATCH] Revert "Allow (and use) @@ -21,7 +21,7 @@ Signed-off-by: Max Ihlenfeldt 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/components/media_router/common/providers/cast/channel/enum_table.h b/components/media_router/common/providers/cast/channel/enum_table.h -index 18fd272..20dc7d9 100644 +index fba9c05770..9cd7596443 100644 --- a/components/media_router/common/providers/cast/channel/enum_table.h +++ b/components/media_router/common/providers/cast/channel/enum_table.h @@ -12,7 +12,6 @@ @@ -32,7 +32,7 @@ index 18fd272..20dc7d9 100644 #include #include #include -@@ -368,7 +367,8 @@ class EnumTable { +@@ -366,7 +365,8 @@ class EnumTable { private: #ifdef ARCH_CPU_64_BITS @@ -43,7 +43,7 @@ index 18fd272..20dc7d9 100644 std::initializer_list data_; bool is_sorted_; diff --git a/styleguide/c++/c++-features.md b/styleguide/c++/c++-features.md -index bb61898..f4cd91a 100644 +index 8bde1b84da..a9222082f6 100644 --- a/styleguide/c++/c++-features.md +++ b/styleguide/c++/c++-features.md @@ -574,6 +574,35 @@ Overlaps with utilities in `base/strings/string_number_conversions.h`, which are @@ -82,7 +82,7 @@ index bb61898..f4cd91a 100644 ### std::in_place{_type,_index}[_t] [banned] ```c++ -@@ -1177,31 +1206,6 @@ avoiding the need to use the `erase(remove(...` paradigm. +@@ -1200,31 +1229,6 @@ avoiding the need to use the `erase(remove(...` paradigm. [Migration bug](https://crbug.com/1414639) *** diff --git a/meta-chromium/recipes-browser/chromium/files/0013-Revert-Set-Rust-symbol-visibility-to-hidden-when-C-s.patch b/meta-chromium/recipes-browser/chromium/files/0013-Revert-Set-Rust-symbol-visibility-to-hidden-when-C-s.patch new file mode 100644 index 000000000..0d291298b --- /dev/null +++ b/meta-chromium/recipes-browser/chromium/files/0013-Revert-Set-Rust-symbol-visibility-to-hidden-when-C-s.patch @@ -0,0 +1,73 @@ +From 6302ea4936e24232af4d50257b94a079471063cf Mon Sep 17 00:00:00 2001 +From: Ariel D'Alessandro +Date: Thu, 14 Nov 2024 22:23:28 -0300 +Subject: [PATCH] Revert "Set Rust symbol visibility to hidden when C++ symbols + are" + +This reverts chromium commit ee3900fd57b3c580aefff15c64052904d81b7760. +* Change-Id: https://crrev.com/c/5966273 + +Fixes the following compilation error: + +``` +| FAILED: obj/third_party/rust/ryu/v1/lib/libryu_lib.rlib +[...] +| error: unknown unstable option: `default-visibility` +``` + +This patch will be dropped once Rust >= 1.83 is available, which +includes: +* rust-lang/rust#130005 [0] +* rust-lang/rust#131519 [1] + +Note that currently meta-lts-mixins [2] provides the following versions: +* kirkstone: `1.80.1` +* scarthgap: `1.81.0` + +[0] https://github.com/rust-lang/rust/pull/130005 +[1] https://github.com/rust-lang/rust/pull/131519 +[2] https://git.yoctoproject.org/meta-lts-mixins + +Upstream-Status: Inappropriate [specific to older versions of rust] +Signed-off-by: Ariel D'Alessandro +--- + build/config/gcc/BUILD.gn | 1 - + build/sanitizers/asan_suppressions.cc | 13 +++++++++++++ + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/build/config/gcc/BUILD.gn b/build/config/gcc/BUILD.gn +index a659210b196aa..147ebfc53426c 100644 +--- a/build/config/gcc/BUILD.gn ++++ b/build/config/gcc/BUILD.gn +@@ -32,7 +32,6 @@ declare_args() { + # See http://gcc.gnu.org/wiki/Visibility + config("symbol_visibility_hidden") { + cflags = [ "-fvisibility=hidden" ] +- rustflags = [ "-Zdefault-visibility=hidden" ] + + # Visibility attribute is not supported on AIX. + if (current_os != "aix") { +diff --git a/build/sanitizers/asan_suppressions.cc b/build/sanitizers/asan_suppressions.cc +index bfbd4b792a919..f0557be762c40 100644 +--- a/build/sanitizers/asan_suppressions.cc ++++ b/build/sanitizers/asan_suppressions.cc +@@ -15,6 +15,19 @@ + // // http://crbug.com/178677 + // "interceptor_via_lib:libsqlite3.so\n" + char kASanDefaultSuppressions[] = ++ // https://crbug.com/1471542 false positive odr violations from Rust code. ++ "odr_violation:^core::\n" ++ "odr_violation:^object::\n" ++ "odr_violation:^std::io::\n" ++ "odr_violation:^serde::\n" ++ "odr_violation:^serde_json_lenient::\n" ++ "odr_violation:^std::panicking::\n" ++ "odr_violation:^std::thread::Builder::\n" ++ "odr_violation:^read_fonts::tables::\n" ++ "odr_violation:^std_detect::detect::cache::\n" ++ "odr_violation:^alloc::sync::\n" ++ "odr_violation:^log::\n" ++ + // End of suppressions. + // PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS. + ""; // Please keep this semicolon. diff --git a/meta-chromium/recipes-browser/chromium/files/0014-pdfium-Fix-missing-PDFiumAPIStringBufferAdapter-temp.patch b/meta-chromium/recipes-browser/chromium/files/0014-pdfium-Fix-missing-PDFiumAPIStringBufferAdapter-temp.patch new file mode 100644 index 000000000..e47cc472f --- /dev/null +++ b/meta-chromium/recipes-browser/chromium/files/0014-pdfium-Fix-missing-PDFiumAPIStringBufferAdapter-temp.patch @@ -0,0 +1,50 @@ +From 20deec0782b78d1c8302764e852ff174f7a4f564 Mon Sep 17 00:00:00 2001 +From: Ariel D'Alessandro +Date: Fri, 15 Nov 2024 00:49:27 -0300 +Subject: [PATCH] pdfium: Fix missing PDFiumAPIStringBufferAdapter template + argument + +Fix the following compilation error: + +``` +| ../../pdf/pdfium/pdfium_api_wrappers.cc:150:32: error: alias template + 'PDFiumAPIStringBufferAdapter' requires template arguments; argument + deduction only allowed for class templates +| 150 | PDFiumAPIStringBufferAdapter adapter(&name, expected_size, +| | ^ +| ../../pdf/pdfium/pdfium_api_string_buffer_adapter.h:173:1: note: template + is declared here +| 173 | using PDFiumAPIStringBufferAdapter = +| | ^ +| 1 error generated. +``` + +This patch will be dropped once clang >= 19.1.0 is available, which +includes support for class template argument deduction (CTAD) for type +alias templates (P1814R0 [0]) (#54051 [1]). + +Note that currently meta-clang [2] provides the clang version `18.1.6`. + +[0] https://wg21.link/p1814r0 +[1] https://github.com/llvm/llvm-project/issues/54051 +[2] https://github.com/kraj/meta-clang + +Upstream-Status: Inappropriate [specific to older versions of clang] +Signed-off-by: Ariel D'Alessandro +--- + pdf/pdfium/pdfium_api_wrappers.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pdf/pdfium/pdfium_api_wrappers.cc b/pdf/pdfium/pdfium_api_wrappers.cc +index b13fe20875e61..60c973b7152ab 100644 +--- a/pdf/pdfium/pdfium_api_wrappers.cc ++++ b/pdf/pdfium/pdfium_api_wrappers.cc +@@ -147,7 +147,7 @@ std::u16string GetPageObjectMarkName(FPDF_PAGEOBJECTMARK mark) { + + // Number of characters, including the NUL. + const size_t expected_size = base::checked_cast(buflen_bytes / 2); +- PDFiumAPIStringBufferAdapter adapter(&name, expected_size, ++ PDFiumAPIStringBufferAdapter adapter(&name, expected_size, + /*check_expected_size=*/true); + unsigned long actual_buflen_bytes = 0; // NOLINT(runtime/int) + bool result = diff --git a/meta-chromium/recipes-browser/chromium/files/0015-Revert-Connect-the-Rust-log-crate-to-the-base-loggin.patch b/meta-chromium/recipes-browser/chromium/files/0015-Revert-Connect-the-Rust-log-crate-to-the-base-loggin.patch new file mode 100644 index 000000000..637bbad0e --- /dev/null +++ b/meta-chromium/recipes-browser/chromium/files/0015-Revert-Connect-the-Rust-log-crate-to-the-base-loggin.patch @@ -0,0 +1,488 @@ +From a8d282ffd65a8de353a446485d730b27ccd5cd67 Mon Sep 17 00:00:00 2001 +From: Ariel D'Alessandro +Date: Fri, 1 Nov 2024 08:48:02 -0300 +Subject: [PATCH] Revert "Connect the Rust log crate to the //base logging + implementation" + +This reverts chromium commit 7ea0a5e831dd5 ("Connect the Rust log crate +to the //base logging implementation". + +The above commit enabled bindgen for the Rust logger. Similar to patch +0011-Disable-crabbyavif-to-fix-build-errors.patch added in commit [0], +this fixes a build error that's most likely because the way upstream +configures bindgen makes it incompatible with our cross-architecture +builds. + +``` +| FAILED: gen/base/logging_rust_log_integration_bindgen_generator/bindings.rs +| [...] +| panicked at bindgen-cli/main.rs:52:36: +| Unable to generate bindings: ClangDiagnostic("error: unsupported option '-mbranch-protection=' for target 'x86_64-unknown-linux-gnu'\n") +``` + +[0] meta-browser commit fd347dc ("chromium: Update to 127.0.6533.99") + +Upstream-Status: Inappropriate [specific to our build setup] +Signed-off-by: Ariel D'Alessandro +--- + base/BUILD.gn | 42 ---------- + base/logging.cc | 9 --- + base/logging/rust_log_integration.cc | 24 ------ + base/logging/rust_log_integration.h | 29 ------- + base/logging/rust_log_integration_unittest.cc | 76 ------------------- + base/logging/rust_logger.rs | 74 ------------------ + base/test/BUILD.gn | 13 ---- + .../test/logging/test_rust_logger_consumer.rs | 41 ---------- + .../rust/chromium_crates_io/gnrt_config.toml | 1 + + third_party/rust/log/v0_4/BUILD.gn | 2 + + 10 files changed, 3 insertions(+), 308 deletions(-) + delete mode 100644 base/logging/rust_log_integration.cc + delete mode 100644 base/logging/rust_log_integration.h + delete mode 100644 base/logging/rust_log_integration_unittest.cc + delete mode 100644 base/logging/rust_logger.rs + delete mode 100644 base/test/logging/test_rust_logger_consumer.rs + +diff --git a/base/BUILD.gn b/base/BUILD.gn +index bc3e57164a010..ba0a6cad17477 100644 +--- a/base/BUILD.gn ++++ b/base/BUILD.gn +@@ -38,8 +38,6 @@ import("//build/config/sanitizers/sanitizers.gni") + import("//build/config/sysroot.gni") + import("//build/config/ui.gni") + import("//build/nocompile.gni") +-import("//build/rust/rust_bindgen.gni") +-import("//build/rust/rust_static_library.gni") + import("//build/timestamp.gni") + import("//build/util/process_version.gni") + import("//build_overrides/build.gni") +@@ -1022,9 +1020,7 @@ component("base") { + # Used by metrics/crc32, except on NaCl builds. + deps += [ "//third_party/zlib" ] + +- # NaCl does not support Rust. + deps += [ +- ":rust_logger", + "//third_party/rust/serde_json_lenient/v0_2/wrapper", + ] + } +@@ -1545,8 +1541,6 @@ component("base") { + "files/scoped_temp_file.h", + "json/json_file_value_serializer.cc", + "json/json_file_value_serializer.h", +- "logging/rust_log_integration.cc", +- "logging/rust_log_integration.h", + "memory/discardable_memory.cc", + "memory/discardable_memory.h", + "memory/discardable_memory_allocator.cc", +@@ -2449,41 +2443,6 @@ component("base") { + } + } + +-rust_bindgen("logging_log_severity_bindgen") { +- # TODO(danakj): Maybe combine all base bindgen targets, or all base/logging +- # ones even) into a single GN target? But the GN rule needs to handle multiple +- # headers then. +- header = "logging/log_severity.h" +- cpp = true +- visibility = [ ":*" ] +- +- # Transitive generated header dependency. +- deps = [ ":debugging_buildflags" ] +-} +- +-rust_bindgen("logging_rust_log_integration_bindgen") { +- header = "logging/rust_log_integration.h" +- cpp = true +- visibility = [ ":*" ] +- +- # Transitive generated header dependency. +- deps = [ ":debugging_buildflags" ] +-} +- +-rust_static_library("rust_logger") { +- allow_unsafe = true # Unsafe needed for FFI. +- deps = [ +- ":logging_log_severity_bindgen", +- ":logging_rust_log_integration_bindgen", +- "//third_party/rust/log/v0_4:lib", +- ] +- visibility = [ ":base" ] +- sources = [ "logging/rust_logger.rs" ] +- crate_root = "logging/rust_logger.rs" +- +- cxx_bindings = [ "logging/rust_logger.rs" ] +-} +- + if (is_linux || is_chromeos) { + # Split out as a separate target for two reasons: + # - the line number reader is 2x slower in debug builds if not optimized, +@@ -3287,7 +3246,6 @@ test("base_unittests") { + "json/string_escape_unittest.cc", + "json/values_util_unittest.cc", + "lazy_instance_unittest.cc", +- "logging/rust_log_integration_unittest.cc", + "logging_unittest.cc", + "memory/aligned_memory_unittest.cc", + "memory/discardable_memory_backing_field_trial_unittest.cc", +diff --git a/base/logging.cc b/base/logging.cc +index 508ce135131aa..d296b81fa6d36 100644 +--- a/base/logging.cc ++++ b/base/logging.cc +@@ -126,10 +126,6 @@ typedef FILE* FileHandle; + #include "base/fuchsia/scoped_fx_logger.h" + #endif + +-#if !BUILDFLAG(IS_NACL) +-#include "base/logging/rust_logger.rs.h" +-#endif +- + namespace logging { + + namespace { +@@ -526,11 +522,6 @@ bool BaseInitLoggingImpl(const LoggingSettings& settings) { + } + #endif + +-#if !BUILDFLAG(IS_NACL) +- // Connects Rust logging with the //base logging functionality. +- internal::init_rust_log_crate(); +-#endif +- + // Ignore file options unless logging to file is set. + if ((g_logging_destination & LOG_TO_FILE) == 0) + return true; +diff --git a/base/logging/rust_log_integration.cc b/base/logging/rust_log_integration.cc +deleted file mode 100644 +index 1dba55d18a64a..0000000000000 +--- a/base/logging/rust_log_integration.cc ++++ /dev/null +@@ -1,24 +0,0 @@ +-// Copyright 2024 The Chromium Authors +-// Use of this source code is governed by a BSD-style license that can be +-// found in the LICENSE file. +- +-#include "base/logging/rust_log_integration.h" +- +-#include "base/logging.h" +-#include "base/logging/log_severity.h" +- +-namespace logging { +-namespace internal { +- +-BASE_EXPORT void print_rust_log(const char* msg, +- const char* file, +- int line, +- LogSeverity severity, +- bool verbose) { +- // TODO(danakj): If `verbose` make the log equivalent to VLOG instead of LOG. +- logging::LogMessage log_message(file, line, severity); +- log_message.stream() << msg; +-} +- +-} // namespace internal +-} // namespace logging +diff --git a/base/logging/rust_log_integration.h b/base/logging/rust_log_integration.h +deleted file mode 100644 +index 1795950e18557..0000000000000 +--- a/base/logging/rust_log_integration.h ++++ /dev/null +@@ -1,29 +0,0 @@ +-// Copyright 2024 The Chromium Authors +-// Use of this source code is governed by a BSD-style license that can be +-// found in the LICENSE file. +- +-#ifndef BASE_LOGGING_RUST_LOG_INTEGRATION_H_ +-#define BASE_LOGGING_RUST_LOG_INTEGRATION_H_ +- +-#include "base/base_export.h" +-#include "base/logging/log_severity.h" +- +-namespace logging { +-namespace internal { +- +-// Receives a log line from Rust and forwards it to base logging, because +-// logging::LogMessage is not accessible from Rust yet with our current interop +-// tools. +-// +-// TODO(danakj): Should this helper function be replaced with C-like apis next +-// to logging::LogMessage that Rust uses more directly? +-void BASE_EXPORT print_rust_log(const char* msg, +- const char* file, +- int line, +- LogSeverity severity, +- bool verbose); +- +-} // namespace internal +-} // namespace logging +- +-#endif // BASE_LOGGING_RUST_LOG_INTEGRATION_H_ +diff --git a/base/logging/rust_log_integration_unittest.cc b/base/logging/rust_log_integration_unittest.cc +deleted file mode 100644 +index 8fc0fec7e1350..0000000000000 +--- a/base/logging/rust_log_integration_unittest.cc ++++ /dev/null +@@ -1,76 +0,0 @@ +-// Copyright 2024 The Chromium Authors +-// Use of this source code is governed by a BSD-style license that can be +-// found in the LICENSE file. +- +-#include "base/logging.h" +-#include "base/test/logging/test_rust_logger_consumer.rs.h" +-#include "base/test/mock_log.h" +- +-using testing::_; +- +-namespace logging { +-namespace { +- +-class RustLogIntegrationTest : public testing::Test { +- public: +- void SetUp() override { log_.StartCapturingLogs(); } +- +- void TearDown() override { log_.StopCapturingLogs(); } +- +- base::test::MockLog log_; +-}; +- +-// TODO(crbug.com/374023535): Logging does not work in component builds. +-#if defined(COMPONENT_BUILD) +-#define MAYBE_CheckAllSeverity DISABLED_CheckAllSeverity +-#else +-#define MAYBE_CheckAllSeverity CheckAllSeverity +-#endif +-TEST_F(RustLogIntegrationTest, MAYBE_CheckAllSeverity) { +-#if DCHECK_IS_ON() +- // Debug and Trace logs from Rust are discarded when DCHECK_IS_ON() is false; +- // otherwise, they are logged as info. +- EXPECT_CALL(log_, +- Log(LOGGING_INFO, _, _, _, testing::HasSubstr("test trace log"))) +- .WillOnce(testing::Return(true)); +- +- EXPECT_CALL(log_, +- Log(LOGGING_INFO, _, _, _, testing::HasSubstr("test debug log"))) +- .WillOnce(testing::Return(true)); +-#endif +- +- EXPECT_CALL(log_, +- Log(LOGGING_INFO, _, _, _, testing::HasSubstr("test info log"))) +- .WillOnce(testing::Return(true)); +- +- EXPECT_CALL(log_, Log(LOGGING_WARNING, _, _, _, +- testing::HasSubstr("test warning log"))) +- .WillOnce(testing::Return(true)); +- +- EXPECT_CALL(log_, +- Log(LOGGING_ERROR, _, _, _, testing::HasSubstr("test error log"))) +- .WillOnce(testing::Return(true)); +- +- base::test::print_test_trace_log(); +- base::test::print_test_debug_log(); +- base::test::print_test_info_log(); +- base::test::print_test_warning_log(); +- base::test::print_test_error_log(); +-} +- +-// TODO(crbug.com/374023535): Logging does not work in component builds. +-#if defined(COMPONENT_BUILD) +-#define MAYBE_Placeholders DISABLED_Placeholders +-#else +-#define MAYBE_Placeholders Placeholders +-#endif +-TEST_F(RustLogIntegrationTest, MAYBE_Placeholders) { +- EXPECT_CALL(log_, Log(LOGGING_ERROR, _, _, _, +- testing::HasSubstr("test log with placeholder 2"))) +- .WillOnce(testing::Return(true)); +- +- base::test::print_test_error_log_with_placeholder(2); +-} +- +-} // namespace +-} // namespace logging +diff --git a/base/logging/rust_logger.rs b/base/logging/rust_logger.rs +deleted file mode 100644 +index 918c1ce0f58bd..0000000000000 +--- a/base/logging/rust_logger.rs ++++ /dev/null +@@ -1,74 +0,0 @@ +-// Copyright 2024 The Chromium Authors +-// Use of this source code is governed by a BSD-style license that can be +-// found in the LICENSE file. +- +-chromium::import! { +- "//base:logging_log_severity_bindgen" as log_severity; +- "//base:logging_rust_log_integration_bindgen" as rust_log_integration; +-} +- +-use log::Level::{Debug, Error, Info, Trace, Warn}; +-use log::{LevelFilter, Metadata, Record}; +-use log_severity::logging::{LOGGING_ERROR, LOGGING_INFO, LOGGING_WARNING}; +-use rust_log_integration::logging::internal::print_rust_log; +-use std::ffi::CString; +- +-struct RustLogger; +- +-impl log::Log for RustLogger { +- fn enabled(&self, _metadata: &Metadata) -> bool { +- // Always enabled, as it's controlled by command line flags managed by the C++ +- // implementation. +- true +- } +- +- fn log(&self, record: &Record) { +- // TODO(thiruak1024@gmail.com): Rather than using heap allocation to pass |msg| +- // and |file|, we should return a pointer and size object to leverage the +- // string_view object in C++. https://crbug.com/371112531 +- let msg = match record.args().as_str() { +- Some(s) => CString::new(s), +- None => CString::new(&*record.args().to_string()), +- } +- .expect("CString::new failed to create the log message!"); +- let file = CString::new(record.file().unwrap()) +- .expect("CString::new failed to create the log file name!"); +- unsafe { +- print_rust_log( +- msg.as_ptr(), +- file.as_ptr(), +- record.line().unwrap() as i32, +- match record.metadata().level() { +- Error => LOGGING_ERROR, +- Warn => LOGGING_WARNING, +- Info => LOGGING_INFO, +- // Note that Debug and Trace level logs are dropped at +- // compile time at the macro call-site when DCHECK_IS_ON() +- // is false. This is done through a Cargo feature. +- Debug | Trace => LOGGING_INFO, +- }, +- record.metadata().level() == Trace, +- ) +- } +- } +- fn flush(&self) {} +-} +- +-static RUST_LOGGER: RustLogger = RustLogger; +- +-#[cxx::bridge(namespace = "logging::internal")] +-mod ffi { +- extern "Rust" { +- fn init_rust_log_crate(); +- } +-} +- +-pub fn init_rust_log_crate() { +- // An error may occur if set_logger has already been called, which can happen +- // during unit tests. In that case, return from the method without executing the +- // subsequent code. +- if let Err(_) = log::set_logger(&RUST_LOGGER) { +- return; +- }; +- log::set_max_level(LevelFilter::Trace); +-} +diff --git a/base/test/BUILD.gn b/base/test/BUILD.gn +index ddf58b1d496e0..77b571c31a31c 100644 +--- a/base/test/BUILD.gn ++++ b/base/test/BUILD.gn +@@ -7,7 +7,6 @@ import("//build/config/chromeos/ui_mode.gni") + import("//build/config/features.gni") + import("//build/config/nacl/config.gni") + import("//build/config/ui.gni") +-import("//build/rust/rust_static_library.gni") + import("//build_overrides/build.gni") + import("//third_party/protobuf/proto_library.gni") + +@@ -39,17 +38,6 @@ static_library("test_config") { + ] + } + +-rust_static_library("test_rust_logger_consumer") { +- allow_unsafe = true # Unsafe needed for FFI +- testonly = true +- deps = [ "//third_party/rust/log/v0_4:lib" ] +- sources = [ "logging/test_rust_logger_consumer.rs" ] +- +- crate_root = "logging/test_rust_logger_consumer.rs" +- +- cxx_bindings = [ "logging/test_rust_logger_consumer.rs" ] +-} +- + static_library("test_support") { + testonly = true + sources = [ +@@ -189,7 +177,6 @@ static_library("test_support") { + + public_deps = [ + ":test_config", +- ":test_rust_logger_consumer", + "//base", + "//base:base_static", + "//base:i18n", +diff --git a/base/test/logging/test_rust_logger_consumer.rs b/base/test/logging/test_rust_logger_consumer.rs +deleted file mode 100644 +index dc8adc6b85f22..0000000000000 +--- a/base/test/logging/test_rust_logger_consumer.rs ++++ /dev/null +@@ -1,41 +0,0 @@ +-// Copyright 2024 The Chromium Authors +-// Use of this source code is governed by a BSD-style license that can be +-// found in the LICENSE file. +- +-use log::{debug, error, info, trace, warn}; +- +-#[cxx::bridge(namespace = "base::test")] +-mod ffi { +- extern "Rust" { +- fn print_test_info_log(); +- fn print_test_warning_log(); +- fn print_test_error_log(); +- fn print_test_debug_log(); +- fn print_test_trace_log(); +- fn print_test_error_log_with_placeholder(i: i32); +- } +-} +- +-pub fn print_test_info_log() { +- info!("test info log"); +-} +- +-pub fn print_test_warning_log() { +- warn!("test warning log"); +-} +- +-pub fn print_test_error_log() { +- error!("test error log"); +-} +- +-pub fn print_test_debug_log() { +- debug!("test debug log"); +-} +- +-pub fn print_test_trace_log() { +- trace!("test trace log"); +-} +- +-fn print_test_error_log_with_placeholder(i: i32) { +- error!("test log with placeholder {}", i); +-} +diff --git a/third_party/rust/chromium_crates_io/gnrt_config.toml b/third_party/rust/chromium_crates_io/gnrt_config.toml +index 9f36dd0efc3d3..828786f06ff8c 100644 +--- a/third_party/rust/chromium_crates_io/gnrt_config.toml ++++ b/third_party/rust/chromium_crates_io/gnrt_config.toml +@@ -163,6 +163,7 @@ ban_features = [ + ] + + [crate.log] ++group = 'test' + + [crate.nom] + remove_deps = ['minimal-lexical'] +diff --git a/third_party/rust/log/v0_4/BUILD.gn b/third_party/rust/log/v0_4/BUILD.gn +index 6db643f2c446b..6e871e1b71808 100644 +--- a/third_party/rust/log/v0_4/BUILD.gn ++++ b/third_party/rust/log/v0_4/BUILD.gn +@@ -43,4 +43,6 @@ cargo_crate("lib") { + "release_max_level_info", + "std", + ] ++ ++ testonly = true + } diff --git a/meta-chromium/recipes-browser/chromium/gn-native_131.0.6778.139.bb b/meta-chromium/recipes-browser/chromium/gn-native_132.0.6834.83.bb similarity index 100% rename from meta-chromium/recipes-browser/chromium/gn-native_131.0.6778.139.bb rename to meta-chromium/recipes-browser/chromium/gn-native_132.0.6834.83.bb