From 9a78fc29d33fb146a90c2e77988171f5fb58da45 Mon Sep 17 00:00:00 2001 From: JustKidding Date: Sun, 10 Mar 2024 21:31:54 -0500 Subject: upgpkg: ungoogled-chromium 122.0.6261.111-1 upstream release --- .SRCINFO | 29 +- PKGBUILD | 41 +- REVERT-simplify-blink-NativeValueTraitsBase.patch | 747 --------------------- ...-Iterate-for-converting-script-wrappables.patch | 174 ----- chromium-constexpr.patch | 48 -- compiler-rt-16.patch | 36 - compiler-rt-adjust-paths.patch | 32 + drop-flag-unsupported-by-clang17.patch | 29 + drop-flags-unsupported-by-clang16.patch | 40 -- 9 files changed, 86 insertions(+), 1090 deletions(-) delete mode 100644 REVERT-simplify-blink-NativeValueTraitsBase.patch delete mode 100644 REVERT-use-v8-Array-Iterate-for-converting-script-wrappables.patch delete mode 100644 chromium-constexpr.patch delete mode 100644 compiler-rt-16.patch create mode 100644 compiler-rt-adjust-paths.patch create mode 100644 drop-flag-unsupported-by-clang17.patch delete mode 100644 drop-flags-unsupported-by-clang16.patch diff --git a/.SRCINFO b/.SRCINFO index bed7bf1..b3cdd7c 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = ungoogled-chromium pkgdesc = A lightweight approach to removing Google web service dependency - pkgver = 122.0.6261.69 + pkgver = 122.0.6261.111 pkgrel = 1 url = https://github.com/ungoogled-software/ungoogled-chromium arch = x86_64 @@ -13,6 +13,7 @@ pkgbase = ungoogled-chromium makedepends = gperf makedepends = nodejs makedepends = pipewire + makedepends = rust makedepends = qt5-base makedepends = java-runtime-headless makedepends = git @@ -52,38 +53,32 @@ pkgbase = ungoogled-chromium optdepends = org.freedesktop.secrets: password storage backend on GNOME / Xfce optdepends = kwallet: support for storing passwords in KWallet on Plasma optdepends = chromium-extension-web-store: Web Store Functionality - provides = chromium=122.0.6261.69 - provides = chromedriver=122.0.6261.69 + provides = chromium=122.0.6261.111 + provides = chromedriver=122.0.6261.111 conflicts = chromium conflicts = chromedriver options = !lto - source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-122.0.6261.69.tar.xz + source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-122.0.6261.111.tar.xz source = https://github.com/foutrelis/chromium-launcher/archive/v8/chromium-launcher-8.tar.gz source = https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/122/chromium-patches-122.tar.bz2 source = support-ICU-74-in-LazyTextBreakIterator.patch - source = REVERT-simplify-blink-NativeValueTraitsBase.patch - source = REVERT-use-v8-Array-Iterate-for-converting-script-wrappables.patch - source = chromium-constexpr.patch - source = drop-flags-unsupported-by-clang16.patch - source = compiler-rt-16.patch + source = drop-flag-unsupported-by-clang17.patch + source = compiler-rt-adjust-paths.patch source = use-oauth2-client-switches-as-default.patch - source = ungoogled-chromium-122.0.6261.69-1.tar.gz::https://github.com/ungoogled-software/ungoogled-chromium/archive/122.0.6261.69-1.tar.gz + source = ungoogled-chromium-122.0.6261.111-1.tar.gz::https://github.com/ungoogled-software/ungoogled-chromium/archive/122.0.6261.111-1.tar.gz source = 0001-vaapi-flag-ozone-wayland.patch source = 0001-adjust-buffer-format-order.patch source = 0001-enable-linux-unstable-deb-target.patch source = 0001-ozone-wayland-implement-text_input_manager_v3.patch source = 0001-ozone-wayland-implement-text_input_manager-fixes.patch - sha256sums = f5bf4085ad3173883b45ea72b483d07f50ec3aa0f7546ac3837a9d26d0b4f9c0 + sha256sums = 0b3da2f0ca63625e84a1b36571f23591248b8fcb422ce683c09283dbfc35c309 sha256sums = 213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a sha256sums = 1f6acf165578288dc84edc7d9dcfabf7d38f55153b63a37ee5afa929f0e2baad sha256sums = 8c256b2a9498a63706a6e7a55eadbeb8cc814be66a75e49aec3716c6be450c6c - sha256sums = 318df8f8662071cebcdf953698408058e17f59f184500b7e12e01a04a4206b50 - sha256sums = 00e06b889e4face0ef41293233ce55bd52064ab040f1fdd84aa19525f8ac3601 - sha256sums = a061f83e2b628927feb4dbc441eb54f8b8c3d81348e447cf3b90755d7cda5f54 - sha256sums = 53774fd7f807ad42f77d45cab9e5480cc2bcb0a5c5138110a434407521af9607 - sha256sums = 8a2649dcc6ff8d8f24ddbe40dc2a171824f681c6f33c39c4792b645b87c9dcab + sha256sums = 3bd35dab1ded5d9e1befa10d5c6c4555fe0a76d909fb724ac57d0bf10cb666c1 + sha256sums = b3de01b7df227478687d7517f61a777450dca765756002c80c4915f271e2d961 sha256sums = e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711 - sha256sums = 6c2405ca58cae05ea1c8116495d7885a0f42f44ca3d70b2bd8f11c27abb23c52 + sha256sums = 927ee3d2518d7c4757ba367e98810b18a16b9468c71a4ab39f84b2282a743c23 sha256sums = 9a5594293616e1390462af1f50276ee29fd6075ffab0e3f944f6346cb2eb8aec sha256sums = 8ba5c67b7eb6cacd2dbbc29e6766169f0fca3bbb07779b1a0a76c913f17d343f sha256sums = 2a44756404e13c97d000cc0d859604d6848163998ea2f838b3b9bb2c840967e3 diff --git a/PKGBUILD b/PKGBUILD index 338bff9..6bca46e 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -11,11 +11,11 @@ # Contributor: Daniel J Griffiths pkgname=ungoogled-chromium -pkgver=122.0.6261.69 +pkgver=122.0.6261.111 pkgrel=1 _launcher_ver=8 _manual_clone=0 -_system_clang=0 +_system_clang=1 pkgdesc="A lightweight approach to removing Google web service dependency" arch=('x86_64') url="https://github.com/ungoogled-software/ungoogled-chromium" @@ -24,7 +24,7 @@ depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt' 'ttf-liberation' 'systemd' 'dbus' 'libpulse' 'pciutils' 'libva' 'libffi' 'desktop-file-utils' 'hicolor-icon-theme') makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire' - 'qt5-base' 'java-runtime-headless' 'git') + 'rust' 'qt5-base' 'java-runtime-headless' 'git') optdepends=('pipewire: WebRTC desktop sharing under Wayland' 'kdialog: support for native dialogs in Plasma' 'qt5-base: enable Qt5 with --enable-features=AllowQt' @@ -36,21 +36,15 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/chrom https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${pkgver%%.*}/chromium-patches-${pkgver%%.*}.tar.bz2 support-ICU-74-in-LazyTextBreakIterator.patch - REVERT-simplify-blink-NativeValueTraitsBase.patch - REVERT-use-v8-Array-Iterate-for-converting-script-wrappables.patch - chromium-constexpr.patch - drop-flags-unsupported-by-clang16.patch - compiler-rt-16.patch + drop-flag-unsupported-by-clang17.patch + compiler-rt-adjust-paths.patch use-oauth2-client-switches-as-default.patch) -sha256sums=('f5bf4085ad3173883b45ea72b483d07f50ec3aa0f7546ac3837a9d26d0b4f9c0' +sha256sums=('0b3da2f0ca63625e84a1b36571f23591248b8fcb422ce683c09283dbfc35c309' '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a' '1f6acf165578288dc84edc7d9dcfabf7d38f55153b63a37ee5afa929f0e2baad' '8c256b2a9498a63706a6e7a55eadbeb8cc814be66a75e49aec3716c6be450c6c' - '318df8f8662071cebcdf953698408058e17f59f184500b7e12e01a04a4206b50' - '00e06b889e4face0ef41293233ce55bd52064ab040f1fdd84aa19525f8ac3601' - 'a061f83e2b628927feb4dbc441eb54f8b8c3d81348e447cf3b90755d7cda5f54' - '53774fd7f807ad42f77d45cab9e5480cc2bcb0a5c5138110a434407521af9607' - '8a2649dcc6ff8d8f24ddbe40dc2a171824f681c6f33c39c4792b645b87c9dcab' + '3bd35dab1ded5d9e1befa10d5c6c4555fe0a76d909fb724ac57d0bf10cb666c1' + 'b3de01b7df227478687d7517f61a777450dca765756002c80c4915f271e2d961' 'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711') if (( _manual_clone )); then @@ -72,7 +66,7 @@ source=("${source[@]}" 0001-ozone-wayland-implement-text_input_manager_v3.patch 0001-ozone-wayland-implement-text_input_manager-fixes.patch) sha256sums=("${sha256sums[@]}" - '6c2405ca58cae05ea1c8116495d7885a0f42f44ca3d70b2bd8f11c27abb23c52' + '927ee3d2518d7c4757ba367e98810b18a16b9468c71a4ab39f84b2282a743c23' '9a5594293616e1390462af1f50276ee29fd6075ffab0e3f944f6346cb2eb8aec' '8ba5c67b7eb6cacd2dbbc29e6766169f0fca3bbb07779b1a0a76c913f17d343f' '2a44756404e13c97d000cc0d859604d6848163998ea2f838b3b9bb2c840967e3' @@ -144,20 +138,11 @@ prepare() { # Upstream fixes patch -Np1 -i ../support-ICU-74-in-LazyTextBreakIterator.patch - # Fix "error: defaulted definition of equality comparison operator cannot - # be declared constexpr because it invokes a non-constexpr comparison - # function" (patch for Chromium 121 from Fedora, later extended for 122) - patch -Np1 -i ../chromium-constexpr.patch + # Drop compiler flag that needs newer clang + patch -Np1 -i ../drop-flag-unsupported-by-clang17.patch - # Revert usage of C++20 features which likely need newer clang - patch -Rp1 -i ../REVERT-use-v8-Array-Iterate-for-converting-script-wrappables.patch - patch -Rp1 -i ../REVERT-simplify-blink-NativeValueTraitsBase.patch - - # Drop compiler flags that need newer clang - patch -Np1 -i ../drop-flags-unsupported-by-clang16.patch - - # Allow libclang_rt.builtins from compiler-rt 16 to be used - patch -Np1 -i ../compiler-rt-16.patch + # Allow libclang_rt.builtins from compiler-rt >= 16 to be used + patch -Np1 -i ../compiler-rt-adjust-paths.patch # Fixes for building with libstdc++ instead of libc++ patch -Np1 -i ../chromium-patches-*/chromium-114-ruy-include.patch diff --git a/REVERT-simplify-blink-NativeValueTraitsBase.patch b/REVERT-simplify-blink-NativeValueTraitsBase.patch deleted file mode 100644 index fc046cb..0000000 --- a/REVERT-simplify-blink-NativeValueTraitsBase.patch +++ /dev/null @@ -1,747 +0,0 @@ -From 940af9f2c87b436559b97c53763aa9eaaf1254eb Mon Sep 17 00:00:00 2001 -From: Jeremy Roman -Date: Wed, 15 Nov 2023 16:24:54 +0000 -Subject: [PATCH] Use C++20 features to simplify blink::NativeValueTraitsBase. - -These allow some of the metaprogramming bits to be simplified a little. - -Change-Id: I052b4397586d21348401616e1792afdb9662f975 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5030335 -Reviewed-by: Yuki Shiino -Commit-Queue: Jeremy Roman -Cr-Commit-Position: refs/heads/main@{#1224978} ---- - .../bindings/core/v8/native_value_traits.h | 54 ++---- - .../v8/native_value_traits_buffer_sources.cc | 166 ++++++++---------- - .../core/v8/native_value_traits_impl.h | 159 +++++++---------- - 3 files changed, 151 insertions(+), 228 deletions(-) - -diff --git a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h -index 7fc91d14acc71a2..1e5a0790df6da81 100644 ---- a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h -+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h -@@ -5,6 +5,7 @@ - #ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_H_ - #define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_H_ - -+#include - #include - - #include "third_party/blink/renderer/bindings/core/v8/idl_types_base.h" -@@ -30,7 +31,7 @@ class ExceptionState; - // return toInt32(isolate, value, exceptionState, NormalConversion); - // } - // } --template -+template - struct NativeValueTraits; - - // This declaration serves only as a blueprint for specializations: the -@@ -45,22 +46,15 @@ struct NativeValueTraits; - - namespace bindings { - --template --struct NativeValueTraitsHasIsNull : std::false_type {}; -- - template --struct NativeValueTraitsHasIsNull< -- T, -- std::void_t().IsNull())>> : std::true_type {}; -+struct ImplTypeFor { -+ using type = T; -+}; - - template --struct NativeValueTraitsHasNullValue { -- // true if |T| supports IDL null value. -- static constexpr bool value = -- // ScriptValue, String, and union types have IsNull member function. -- bindings::NativeValueTraitsHasIsNull::value || -- // Pointer types have nullptr as IDL null value. -- std::is_pointer::value; -+ requires std::derived_from -+struct ImplTypeFor { -+ using type = typename T::ImplType; - }; - - } // namespace bindings -@@ -78,37 +72,17 @@ struct NativeValueTraitsHasNullValue { - // If present, |NullValue()| will be used when converting from the nullable type - // T?, and should be used if the impl type has an existing "null" state. If not - // present, WTF::Optional will be used to wrap the type. --template --struct NativeValueTraitsBase { -- STATIC_ONLY(NativeValueTraitsBase); -- -- using ImplType = T; -- -- static constexpr bool has_null_value = -- bindings::NativeValueTraitsHasNullValue::value; -- -- template -- static decltype(auto) ArgumentValue(v8::Isolate* isolate, -- int argument_index, -- v8::Local value, -- ExceptionState& exception_state, -- ExtraArgs... extra_args) { -- return NativeValueTraits>::NativeValue( -- isolate, value, exception_state, -- std::forward(extra_args)...); -- } --}; -- - template --struct NativeValueTraitsBase< -- T, -- std::enable_if_t::value>> { -+struct NativeValueTraitsBase { - STATIC_ONLY(NativeValueTraitsBase); - -- using ImplType = typename T::ImplType; -+ using ImplType = bindings::ImplTypeFor::type; - -+ // Pointer types have nullptr as IDL null value. -+ // ScriptValue, String, and union types have IsNull member function. - static constexpr bool has_null_value = -- bindings::NativeValueTraitsHasNullValue::value; -+ std::is_pointer_v || -+ requires(ImplType value) { value.IsNull(); }; - - template - static decltype(auto) ArgumentValue(v8::Isolate* isolate, -diff --git a/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc b/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc -index 508ea6d8eea481e..18de71d84023f0c 100644 ---- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc -+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc -@@ -7,6 +7,7 @@ - #include "third_party/blink/renderer/core/core_export.h" - #include "third_party/blink/renderer/core/execution_context/execution_context.h" - #include "third_party/blink/renderer/core/frame/web_feature.h" -+#include "third_party/blink/renderer/core/typed_arrays/flexible_array_buffer_view.h" - #include "third_party/blink/renderer/core/typed_arrays/typed_flexible_array_buffer_view.h" - - namespace blink { -@@ -698,12 +699,11 @@ DOMArrayBufferBase* NativeValueTraits< - // ArrayBufferView - - template --NotShared NativeValueTraits< -- NotShared, -- typename std::enable_if_t::value>>:: -- NativeValue(v8::Isolate* isolate, -- v8::Local value, -- ExceptionState& exception_state) { -+ requires std::derived_from -+NotShared NativeValueTraits>::NativeValue( -+ v8::Isolate* isolate, -+ v8::Local value, -+ ExceptionState& exception_state) { - return NativeValueImpl< - RecipeTrait>, ToDOMViewType, - Nullablity::kIsNotNullable, BufferSizeCheck::kCheck, -@@ -712,13 +712,12 @@ NotShared NativeValueTraits< - } - - template --NotShared NativeValueTraits< -- NotShared, -- typename std::enable_if_t::value>>:: -- ArgumentValue(v8::Isolate* isolate, -- int argument_index, -- v8::Local value, -- ExceptionState& exception_state) { -+ requires std::derived_from -+NotShared NativeValueTraits>::ArgumentValue( -+ v8::Isolate* isolate, -+ int argument_index, -+ v8::Local value, -+ ExceptionState& exception_state) { - return ArgumentValueImpl< - RecipeTrait>, ToDOMViewType, - Nullablity::kIsNotNullable, BufferSizeCheck::kCheck, -@@ -729,12 +728,11 @@ NotShared NativeValueTraits< - // [AllowShared] ArrayBufferView - - template --MaybeShared NativeValueTraits< -- MaybeShared, -- typename std::enable_if_t::value>>:: -- NativeValue(v8::Isolate* isolate, -- v8::Local value, -- ExceptionState& exception_state) { -+ requires std::derived_from -+MaybeShared NativeValueTraits>::NativeValue( -+ v8::Isolate* isolate, -+ v8::Local value, -+ ExceptionState& exception_state) { - return NativeValueImpl>, - ToDOMViewType, - Nullablity::kIsNotNullable, BufferSizeCheck::kCheck, -@@ -743,13 +741,12 @@ MaybeShared NativeValueTraits< - } - - template --MaybeShared NativeValueTraits< -- MaybeShared, -- typename std::enable_if_t::value>>:: -- ArgumentValue(v8::Isolate* isolate, -- int argument_index, -- v8::Local value, -- ExceptionState& exception_state) { -+ requires std::derived_from -+MaybeShared NativeValueTraits>::ArgumentValue( -+ v8::Isolate* isolate, -+ int argument_index, -+ v8::Local value, -+ ExceptionState& exception_state) { - return ArgumentValueImpl>, - ToDOMViewType, - Nullablity::kIsNotNullable, BufferSizeCheck::kCheck, -@@ -760,12 +757,12 @@ MaybeShared NativeValueTraits< - // [AllowShared, BufferSourceTypeNoSizeLimit] ArrayBufferView - - template --MaybeShared NativeValueTraits< -- IDLBufferSourceTypeNoSizeLimit>, -- typename std::enable_if_t::value>>:: -- NativeValue(v8::Isolate* isolate, -- v8::Local value, -- ExceptionState& exception_state) { -+ requires std::derived_from -+MaybeShared -+NativeValueTraits>>::NativeValue( -+ v8::Isolate* isolate, -+ v8::Local value, -+ ExceptionState& exception_state) { - return NativeValueImpl< - RecipeTrait>, ToDOMViewType, - Nullablity::kIsNotNullable, BufferSizeCheck::kDoNotCheck, -@@ -774,13 +771,12 @@ MaybeShared NativeValueTraits< - } - - template --MaybeShared NativeValueTraits< -- IDLBufferSourceTypeNoSizeLimit>, -- typename std::enable_if_t::value>>:: -- ArgumentValue(v8::Isolate* isolate, -- int argument_index, -- v8::Local value, -- ExceptionState& exception_state) { -+ requires std::derived_from -+MaybeShared NativeValueTraits>>::ArgumentValue(v8::Isolate* isolate, -+ int argument_index, -+ v8::Local value, -+ ExceptionState& exception_state) { - return ArgumentValueImpl< - RecipeTrait>, ToDOMViewType, - Nullablity::kIsNotNullable, BufferSizeCheck::kDoNotCheck, -@@ -791,12 +787,11 @@ MaybeShared NativeValueTraits< - // Nullable ArrayBufferView - - template --NotShared NativeValueTraits< -- IDLNullable>, -- typename std::enable_if_t::value>>:: -- NativeValue(v8::Isolate* isolate, -- v8::Local value, -- ExceptionState& exception_state) { -+ requires std::derived_from -+NotShared NativeValueTraits>>::NativeValue( -+ v8::Isolate* isolate, -+ v8::Local value, -+ ExceptionState& exception_state) { - return NativeValueImpl< - RecipeTrait>, ToDOMViewType, - Nullablity::kIsNullable, BufferSizeCheck::kCheck, -@@ -805,13 +800,12 @@ NotShared NativeValueTraits< - } - - template --NotShared NativeValueTraits< -- IDLNullable>, -- typename std::enable_if_t::value>>:: -- ArgumentValue(v8::Isolate* isolate, -- int argument_index, -- v8::Local value, -- ExceptionState& exception_state) { -+ requires std::derived_from -+NotShared NativeValueTraits>>::ArgumentValue( -+ v8::Isolate* isolate, -+ int argument_index, -+ v8::Local value, -+ ExceptionState& exception_state) { - return ArgumentValueImpl< - RecipeTrait>, ToDOMViewType, - Nullablity::kIsNullable, BufferSizeCheck::kCheck, -@@ -822,12 +816,11 @@ NotShared NativeValueTraits< - // Nullable [AllowShared] ArrayBufferView - - template --MaybeShared NativeValueTraits< -- IDLNullable>, -- typename std::enable_if_t::value>>:: -- NativeValue(v8::Isolate* isolate, -- v8::Local value, -- ExceptionState& exception_state) { -+ requires std::derived_from -+MaybeShared NativeValueTraits>>::NativeValue( -+ v8::Isolate* isolate, -+ v8::Local value, -+ ExceptionState& exception_state) { - return NativeValueImpl>, - ToDOMViewType, - Nullablity::kIsNullable, BufferSizeCheck::kCheck, -@@ -836,13 +829,12 @@ MaybeShared NativeValueTraits< - } - - template --MaybeShared NativeValueTraits< -- IDLNullable>, -- typename std::enable_if_t::value>>:: -- ArgumentValue(v8::Isolate* isolate, -- int argument_index, -- v8::Local value, -- ExceptionState& exception_state) { -+ requires std::derived_from -+MaybeShared NativeValueTraits>>::ArgumentValue( -+ v8::Isolate* isolate, -+ int argument_index, -+ v8::Local value, -+ ExceptionState& exception_state) { - return ArgumentValueImpl>, - ToDOMViewType, - Nullablity::kIsNullable, BufferSizeCheck::kCheck, -@@ -853,9 +845,9 @@ MaybeShared NativeValueTraits< - // Nullable [AllowShared, BufferSourceTypeNoSizeLimit] ArrayBufferView - - template --MaybeShared NativeValueTraits< -- IDLNullable>>, -- typename std::enable_if_t::value>>:: -+ requires std::derived_from -+MaybeShared -+NativeValueTraits>>>:: - ArgumentValue(v8::Isolate* isolate, - int argument_index, - v8::Local value, -@@ -870,13 +862,11 @@ MaybeShared NativeValueTraits< - // [AllowShared, FlexibleArrayBufferView] ArrayBufferView - - template --T NativeValueTraits::value>>:: -- ArgumentValue(v8::Isolate* isolate, -- int argument_index, -- v8::Local value, -- ExceptionState& exception_state) { -+ requires std::derived_from -+T NativeValueTraits::ArgumentValue(v8::Isolate* isolate, -+ int argument_index, -+ v8::Local value, -+ ExceptionState& exception_state) { - return ArgumentValueImpl, ToFlexibleArrayBufferView, - Nullablity::kIsNotNullable, BufferSizeCheck::kCheck, - ResizableAllowance::kDisallowResizable, -@@ -888,13 +878,12 @@ T NativeValueTraits --T NativeValueTraits, -- typename std::enable_if_t< -- std::is_base_of::value>>:: -- ArgumentValue(v8::Isolate* isolate, -- int argument_index, -- v8::Local value, -- ExceptionState& exception_state) { -+ requires std::derived_from -+T NativeValueTraits>::ArgumentValue( -+ v8::Isolate* isolate, -+ int argument_index, -+ v8::Local value, -+ ExceptionState& exception_state) { - return ArgumentValueImpl< - RecipeTrait, ToFlexibleArrayBufferView, Nullablity::kIsNotNullable, - BufferSizeCheck::kDoNotCheck, ResizableAllowance::kDisallowResizable, -@@ -905,13 +894,12 @@ T NativeValueTraits, - // Nullable [AllowShared, FlexibleArrayBufferView] ArrayBufferView - - template --T NativeValueTraits, -- typename std::enable_if_t< -- std::is_base_of::value>>:: -- ArgumentValue(v8::Isolate* isolate, -- int argument_index, -- v8::Local value, -- ExceptionState& exception_state) { -+ requires std::derived_from -+T NativeValueTraits>::ArgumentValue( -+ v8::Isolate* isolate, -+ int argument_index, -+ v8::Local value, -+ ExceptionState& exception_state) { - return ArgumentValueImpl, ToFlexibleArrayBufferView, - Nullablity::kIsNullable, BufferSizeCheck::kCheck, - ResizableAllowance::kDisallowResizable, -diff --git a/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h b/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h -index 899929dcf49f90a..5011503dcf1c0c8 100644 ---- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h -+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h -@@ -5,6 +5,9 @@ - #ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_IMPL_H_ - #define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_IMPL_H_ - -+#include -+#include -+ - #include "third_party/abseil-cpp/absl/types/optional.h" - #include "third_party/blink/renderer/bindings/core/v8/idl_types.h" - #include "third_party/blink/renderer/bindings/core/v8/native_value_traits.h" -@@ -715,9 +718,8 @@ struct CORE_EXPORT NativeValueTraits< - }; - - template --struct NativeValueTraits< -- T, -- typename std::enable_if_t::value>> { -+ requires std::derived_from -+struct NativeValueTraits { - // NotShared or MaybeShared should be used instead. - static T* NativeValue(v8::Isolate* isolate, - v8::Local value, -@@ -729,9 +731,8 @@ struct NativeValueTraits< - }; - - template --struct NativeValueTraits< -- IDLNullable, -- typename std::enable_if_t::value>> { -+ requires std::derived_from -+struct NativeValueTraits> { - // NotShared or MaybeShared should be used instead. - static T* NativeValue(v8::Isolate* isolate, - v8::Local value, -@@ -743,9 +744,8 @@ struct NativeValueTraits< - }; - - template --struct NativeValueTraits< -- NotShared, -- typename std::enable_if_t::value>> -+ requires std::derived_from -+struct NativeValueTraits> - : public NativeValueTraitsBase> { - static NotShared NativeValue(v8::Isolate* isolate, - v8::Local value, -@@ -758,9 +758,8 @@ struct NativeValueTraits< - }; - - template --struct NativeValueTraits< -- IDLNullable>, -- typename std::enable_if_t::value>> -+ requires std::derived_from -+struct NativeValueTraits>> - : public NativeValueTraitsBase> { - static NotShared NativeValue(v8::Isolate* isolate, - v8::Local value, -@@ -773,9 +772,8 @@ struct NativeValueTraits< - }; - - template --struct NativeValueTraits< -- MaybeShared, -- typename std::enable_if_t::value>> -+ requires std::derived_from -+struct NativeValueTraits> - : public NativeValueTraitsBase> { - static MaybeShared NativeValue(v8::Isolate* isolate, - v8::Local value, -@@ -788,9 +786,8 @@ struct NativeValueTraits< - }; - - template --struct NativeValueTraits< -- IDLBufferSourceTypeNoSizeLimit>, -- typename std::enable_if_t::value>> -+ requires std::derived_from -+struct NativeValueTraits>> - : public NativeValueTraitsBase> { - // FlexibleArrayBufferView uses this in its implementation, so we cannot - // delete it. -@@ -805,9 +802,8 @@ struct NativeValueTraits< - }; - - template --struct NativeValueTraits< -- IDLNullable>, -- typename std::enable_if_t::value>> -+ requires std::derived_from -+struct NativeValueTraits>> - : public NativeValueTraitsBase> { - static MaybeShared NativeValue(v8::Isolate* isolate, - v8::Local value, -@@ -820,9 +816,9 @@ struct NativeValueTraits< - }; - - template -+ requires std::derived_from - struct NativeValueTraits< -- IDLNullable>>, -- typename std::enable_if_t::value>> -+ IDLNullable>>> - : public NativeValueTraitsBase> { - // BufferSourceTypeNoSizeLimit must be used only as arguments. - static MaybeShared NativeValue(v8::Isolate* isolate, -@@ -836,11 +832,8 @@ struct NativeValueTraits< - }; - - template --struct NativeValueTraits< -- T, -- typename std::enable_if_t< -- std::is_base_of::value>> -- : public NativeValueTraitsBase { -+ requires std::derived_from -+struct NativeValueTraits : public NativeValueTraitsBase { - // FlexibleArrayBufferView must be used only as arguments. - static T NativeValue(v8::Isolate* isolate, - v8::Local value, -@@ -853,10 +846,8 @@ struct NativeValueTraits< - }; - - template --struct NativeValueTraits< -- IDLBufferSourceTypeNoSizeLimit, -- typename std::enable_if_t< -- std::is_base_of::value>> -+ requires std::derived_from -+struct NativeValueTraits> - : public NativeValueTraitsBase { - // BufferSourceTypeNoSizeLimit and FlexibleArrayBufferView must be used only - // as arguments. -@@ -871,11 +862,8 @@ struct NativeValueTraits< - }; - - template --struct NativeValueTraits< -- IDLNullable, -- typename std::enable_if_t< -- std::is_base_of::value>> -- : public NativeValueTraitsBase { -+ requires std::derived_from -+struct NativeValueTraits> : public NativeValueTraitsBase { - // FlexibleArrayBufferView must be used only as arguments. - static T NativeValue(v8::Isolate* isolate, - v8::Local value, -@@ -1134,9 +1122,8 @@ NativeValueTraits>::NativeValue( - } - - template --struct NativeValueTraits>, -- typename std::enable_if_t< -- NativeValueTraits>::has_null_value>> -+ requires NativeValueTraits>::has_null_value -+struct NativeValueTraits>> - : public NativeValueTraitsBase>*> { - using ImplType = typename NativeValueTraits>::ImplType*; - -@@ -1203,9 +1190,8 @@ struct NativeValueTraits> - : public NativeValueTraits> {}; - - template --struct NativeValueTraits>, -- typename std::enable_if_t< -- NativeValueTraits>::has_null_value>> -+ requires NativeValueTraits>::has_null_value -+struct NativeValueTraits>> - : public NativeValueTraits>> {}; - - // Record types -@@ -1335,10 +1321,8 @@ struct NativeValueTraits> - - // Callback function types - template --struct NativeValueTraits< -- T, -- typename std::enable_if_t::value>> -- : public NativeValueTraitsBase { -+ requires std::derived_from -+struct NativeValueTraits : public NativeValueTraitsBase { - static T* NativeValue(v8::Isolate* isolate, - v8::Local value, - ExceptionState& exception_state) { -@@ -1361,9 +1345,8 @@ struct NativeValueTraits< - }; - - template --struct NativeValueTraits< -- IDLNullable, -- typename std::enable_if_t::value>> -+ requires std::derived_from -+struct NativeValueTraits> - : public NativeValueTraitsBase> { - static T* NativeValue(v8::Isolate* isolate, - v8::Local value, -@@ -1392,10 +1375,8 @@ struct NativeValueTraits< - - // Callback interface types - template --struct NativeValueTraits< -- T, -- typename std::enable_if_t::value>> -- : public NativeValueTraitsBase { -+ requires std::derived_from -+struct NativeValueTraits : public NativeValueTraitsBase { - static T* NativeValue(v8::Isolate* isolate, - v8::Local value, - ExceptionState& exception_state) { -@@ -1418,9 +1399,8 @@ struct NativeValueTraits< - }; - - template --struct NativeValueTraits< -- IDLNullable, -- typename std::enable_if_t::value>> -+ requires std::derived_from -+struct NativeValueTraits> - : public NativeValueTraitsBase> { - static T* NativeValue(v8::Isolate* isolate, - v8::Local value, -@@ -1449,11 +1429,8 @@ struct NativeValueTraits< - - // Dictionary types - template --struct NativeValueTraits< -- T, -- typename std::enable_if_t< -- std::is_base_of::value>> -- : public NativeValueTraitsBase { -+ requires std::derived_from -+struct NativeValueTraits : public NativeValueTraitsBase { - static T* NativeValue(v8::Isolate* isolate, - v8::Local value, - ExceptionState& exception_state) { -@@ -1464,14 +1441,11 @@ struct NativeValueTraits< - // We don't support nullable dictionary types in general since it's quite - // confusing and often misused. - template --struct NativeValueTraits< -- IDLNullable, -- typename std::enable_if_t< -- std::is_base_of::value && -- (std::is_same::value || -- std::is_same::value || -- std::is_same::value)>> -- : public NativeValueTraitsBase { -+ requires std::derived_from && -+ (std::same_as || -+ std::same_as || -+ std::same_as) -+struct NativeValueTraits> : public NativeValueTraitsBase { - static T* NativeValue(v8::Isolate* isolate, - v8::Local value, - ExceptionState& exception_state) { -@@ -1483,11 +1457,8 @@ struct NativeValueTraits< - - // Enumeration types - template --struct NativeValueTraits< -- T, -- typename std::enable_if_t< -- std::is_base_of::value>> -- : public NativeValueTraitsBase { -+ requires std::derived_from -+struct NativeValueTraits : public NativeValueTraitsBase { - static T NativeValue(v8::Isolate* isolate, - v8::Local value, - ExceptionState& exception_state) { -@@ -1497,10 +1468,8 @@ struct NativeValueTraits< - - // Interface types - template --struct NativeValueTraits< -- T, -- typename std::enable_if_t::value>> -- : public NativeValueTraitsBase { -+ requires std::derived_from -+struct NativeValueTraits : public NativeValueTraitsBase { - static inline T* NativeValue(v8::Isolate* isolate, - v8::Local value, - ExceptionState& exception_state) { -@@ -1528,9 +1497,8 @@ struct NativeValueTraits< - }; - - template --struct NativeValueTraits< -- IDLNullable, -- typename std::enable_if_t::value>> -+ requires std::derived_from -+struct NativeValueTraits> - : public NativeValueTraitsBase> { - static inline T* NativeValue(v8::Isolate* isolate, - v8::Local value, -@@ -1565,10 +1533,8 @@ struct NativeValueTraits< - }; - - template --struct NativeValueTraits< -- T, -- typename std::enable_if_t::value>> -- : public NativeValueTraitsBase { -+ requires std::derived_from -+struct NativeValueTraits : public NativeValueTraitsBase { - static T* NativeValue(v8::Isolate* isolate, - v8::Local value, - ExceptionState& exception_state) { -@@ -1584,10 +1550,8 @@ struct NativeValueTraits< - }; - - template --struct NativeValueTraits< -- IDLNullable, -- typename std::enable_if_t::value>> -- : public NativeValueTraitsBase { -+ requires std::derived_from -+struct NativeValueTraits> : public NativeValueTraitsBase { - static T* NativeValue(v8::Isolate* isolate, - v8::Local value, - ExceptionState& exception_state) { -@@ -1608,9 +1572,8 @@ struct NativeValueTraits< - - // Nullable types - template --struct NativeValueTraits< -- IDLNullable, -- typename std::enable_if_t::has_null_value>> -+ requires(!NativeValueTraits::has_null_value) -+struct NativeValueTraits> - : public NativeValueTraitsBase> { - // https://webidl.spec.whatwg.org/#es-nullable-type - using ImplType = -@@ -1642,9 +1605,8 @@ struct NativeValueTraits>>; - - // Optional types - template --struct NativeValueTraits, -- typename std::enable_if_t::ImplType>::value>> -+ requires std::is_arithmetic_v::ImplType> -+struct NativeValueTraits> - : public NativeValueTraitsBase::ImplType> { - using ImplType = typename NativeValueTraits::ImplType; - -@@ -1666,9 +1628,8 @@ struct NativeValueTraits, - }; - - template --struct NativeValueTraits, -- typename std::enable_if_t::ImplType>::value>> -+ requires std::is_pointer_v::ImplType> -+struct NativeValueTraits> - : public NativeValueTraitsBase::ImplType> { - using ImplType = typename NativeValueTraits::ImplType; - diff --git a/REVERT-use-v8-Array-Iterate-for-converting-script-wrappables.patch b/REVERT-use-v8-Array-Iterate-for-converting-script-wrappables.patch deleted file mode 100644 index 8db4a84..0000000 --- a/REVERT-use-v8-Array-Iterate-for-converting-script-wrappables.patch +++ /dev/null @@ -1,174 +0,0 @@ -From ce71348a09f6689dd01a68db64b172191d0182d8 Mon Sep 17 00:00:00 2001 -From: Andrey Kosyakov -Date: Thu, 21 Dec 2023 18:38:38 +0000 -Subject: [PATCH] [bindings] Use v8::Array::Iterate for converting script - wrappables - -This changes CreateIDLSequenceFromV8Array to use the new -v8::Array::Iterate() operation. -This speeds up the "execBundles" part of the microbenchmark -at crbug.com/dawn/1858 by around 3x. -This depends on crrev.com/c/4846594 landing (and rolling) first. - -This is a slight re-work of https://crrev.com/c/4847447/3, -originally by jkummerow@chromium.org - -Bug: v8:14218, dawn:1858, 1511239 -Change-Id: Ia266556d05b4d53e6942e12609d1c08882b4ff0f -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5132129 -Commit-Queue: Andrey Kosyakov -Reviewed-by: Yuki Shiino -Cr-Commit-Position: refs/heads/main@{#1240236} ---- - .../bindings/core/v8/native_value_traits.h | 6 ++ - .../core/v8/native_value_traits_impl.h | 91 ++++++++++++++++++- - 2 files changed, 95 insertions(+), 2 deletions(-) - -diff --git a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h -index 1e5a0790df6d..a5c28b37e945 100644 ---- a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h -+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h -@@ -84,6 +84,12 @@ struct NativeValueTraitsBase { - std::is_pointer_v || - requires(ImplType value) { value.IsNull(); }; - -+ // This should only be true for certain subclasses of ScriptWrappable -+ // that satisfy the assumptions of CreateIDLSequenceFromV8ArraySlow() with -+ // regards to how NativeValue() is implemented for the underlying type. -+ static constexpr bool supports_scriptwrappable_specific_fast_array_iteration = -+ false; -+ - template - static decltype(auto) ArgumentValue(v8::Isolate* isolate, - int argument_index, -diff --git a/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h b/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h -index 5011503dcf1c..f085b6e90516 100644 ---- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h -+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h -@@ -1037,10 +1037,86 @@ CreateIDLSequenceFromV8ArraySlow(v8::Isolate* isolate, - return {}; - } - -- typename NativeValueTraits>::ImplType result; -+ using ResultType = typename NativeValueTraits>::ImplType; -+ ResultType result; - result.ReserveInitialCapacity(length); - v8::Local current_context = isolate->GetCurrentContext(); - v8::TryCatch try_block(isolate); -+ -+ // Fast path -- we're creating a sequence of script wrappables, which can be -+ // done by directly getting underlying object as long as array types are -+ // homogeneous. With ScriptWrappables, we don't expect to enter JS during -+ // iteration, so we can rely on v8::Array::Iterate() which is much faster than -+ // iterating an array on the client side of the v8. Additionally, for most -+ // subsptyes of ScriptWrappables, we can speed up type checks (see more on -+ // that below next to supports_scriptwrappable_specific_fast_array_iteration -+ // check. -+ if constexpr (std::is_base_of_v) { -+ struct CallbackData { -+ STACK_ALLOCATED(); -+ -+ public: -+ v8::Isolate* isolate; -+ v8::TypecheckWitness witness; -+ ResultType& result; -+ ExceptionState& exception_state; -+ CallbackData(v8::Isolate* isolate, -+ ResultType& result, -+ ExceptionState& exception_state) -+ : isolate(isolate), -+ witness(isolate), -+ result(result), -+ exception_state(exception_state) {} -+ }; -+ -+ CallbackData callback_data(isolate, result, exception_state); -+ v8::Array::IterationCallback callback = [](uint32_t index, -+ v8::Local v8_element, -+ void* data) { -+ CallbackData* callback_data = reinterpret_cast(data); -+ // 3.4. Initialize Si to the result of converting nextItem to an IDL value -+ // of type T. -+ v8::TypecheckWitness& witness = callback_data->witness; -+ // We can speed up type check by taking advantage of V8's type witness, -+ // provided traits' NativeValue implementation doesn't have additional -+ // logic beyond checking the type and calling ToScriptWrappable(). -+ if constexpr ( -+ NativeValueTraits< -+ T>::supports_scriptwrappable_specific_fast_array_iteration) { -+ if (witness.Matches(v8_element)) { -+ auto&& value = ToScriptWrappable(v8_element.As()) -+ ->template ToImpl(); -+ callback_data->result.push_back(std::move(value)); -+ return v8::Array::CallbackResult::kContinue; -+ } -+ } -+ auto&& element = NativeValueTraits::NativeValue( -+ callback_data->isolate, v8_element, callback_data->exception_state); -+ if (callback_data->exception_state.HadException()) { -+ // It doesn't matter whether we return `kException` or `kBreak` here, -+ // as that only affects the return value of `v8_array->Iterate()`, -+ // which we are ignoring. -+ return v8::Array::CallbackResult::kException; -+ } -+ if constexpr ( -+ NativeValueTraits< -+ T>::supports_scriptwrappable_specific_fast_array_iteration) { -+ witness.Update(v8_element); -+ } -+ callback_data->result.push_back(std::move(element)); -+ return v8::Array::CallbackResult::kContinue; -+ }; -+ if (!v8_array->Iterate(current_context, callback, &callback_data) -+ .IsJust()) { -+ if (try_block.HasCaught()) { -+ exception_state.RethrowV8Exception(try_block.Exception()); -+ } -+ DCHECK(exception_state.HadException()); -+ return {}; -+ } -+ return result; -+ } -+ - // Array length may change if array is mutated during iteration. - for (uint32_t i = 0; i < v8_array->Length(); ++i) { - v8::Local v8_element; -@@ -1056,6 +1132,7 @@ CreateIDLSequenceFromV8ArraySlow(v8::Isolate* isolate, - return {}; - result.push_back(std::move(element)); - } -+ - // 3.2. If next is false, then return an IDL sequence value of type - // sequence of length i, where the value of the element at index j is Sj. - return result; -@@ -1398,6 +1475,7 @@ struct NativeValueTraits : public NativeValueTraitsBase { - } - }; - -+// Interface types - template - requires std::derived_from - struct NativeValueTraits> -@@ -1470,12 +1548,21 @@ struct NativeValueTraits : public NativeValueTraitsBase { - template - requires std::derived_from - struct NativeValueTraits : public NativeValueTraitsBase { -+ // This signifies that CreateIDLSequenceFromV8ArraySlow() may apply -+ // certain optimization based on assumptions about `NativeValue()` -+ // implementation below. For subclasses of ScriptWrappable that have -+ // different implementation of NativeValue(), this should remain false. -+ static constexpr bool supports_scriptwrappable_specific_fast_array_iteration = -+ true; -+ - static inline T* NativeValue(v8::Isolate* isolate, - v8::Local value, - ExceptionState& exception_state) { - const WrapperTypeInfo* wrapper_type_info = T::GetStaticWrapperTypeInfo(); -- if (V8PerIsolateData::From(isolate)->HasInstance(wrapper_type_info, value)) -+ if (V8PerIsolateData::From(isolate)->HasInstance(wrapper_type_info, -+ value)) { - return ToScriptWrappable(value.As())->template ToImpl(); -+ } - - bindings::NativeValueTraitsInterfaceNotOfType(wrapper_type_info, - exception_state); diff --git a/chromium-constexpr.patch b/chromium-constexpr.patch deleted file mode 100644 index 35acd39..0000000 --- a/chromium-constexpr.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/base/types/strong_alias.h b/base/types/strong_alias.h -index 9f80b7fc8adf..4d28bd195c8a 100644 ---- a/base/types/strong_alias.h -+++ b/base/types/strong_alias.h -@@ -110,7 +110,7 @@ class StrongAlias { - // a `StrongAlias`. - friend constexpr auto operator<=>(const StrongAlias& lhs, - const StrongAlias& rhs) = default; -- friend constexpr bool operator==(const StrongAlias& lhs, -+ friend bool operator==(const StrongAlias& lhs, - const StrongAlias& rhs) = default; - - // Hasher to use in std::unordered_map, std::unordered_set, etc. -diff --git a/components/autofill/core/common/unique_ids.h b/components/autofill/core/common/unique_ids.h -index eb8d5d2c8ec9..6bfabf286379 100644 ---- a/components/autofill/core/common/unique_ids.h -+++ b/components/autofill/core/common/unique_ids.h -@@ -137,7 +137,7 @@ struct GlobalId { - - friend constexpr auto operator<=>(const GlobalId& lhs, - const GlobalId& rhs) = default; -- friend constexpr bool operator==(const GlobalId& lhs, -+ friend bool operator==(const GlobalId& lhs, - const GlobalId& rhs) = default; - }; - -diff --git a/components/performance_manager/resource_attribution/query_params.h b/components/performance_manager/resource_attribution/query_params.h -index 4616f1665e91..679dfcabe999 100644 ---- a/components/performance_manager/resource_attribution/query_params.h -+++ b/components/performance_manager/resource_attribution/query_params.h -@@ -29,7 +29,7 @@ class ContextCollection { - ContextCollection(const ContextCollection& other); - ContextCollection& operator=(const ContextCollection& other); - -- friend constexpr bool operator==(const ContextCollection&, -+ friend bool operator==(const ContextCollection&, - const ContextCollection&) = default; - - // Adds `context` to the collection. -@@ -67,7 +67,7 @@ struct QueryParams { - QueryParams(const QueryParams& other); - QueryParams& operator=(const QueryParams& other); - -- friend constexpr bool operator==(const QueryParams&, -+ friend bool operator==(const QueryParams&, - const QueryParams&) = default; - - // Resource types to measure. diff --git a/compiler-rt-16.patch b/compiler-rt-16.patch deleted file mode 100644 index e14829a..0000000 --- a/compiler-rt-16.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn -index d4de2e0cca0..57359c32121 100644 ---- a/build/config/clang/BUILD.gn -+++ b/build/config/clang/BUILD.gn -@@ -130,12 +130,15 @@ template("clang_lib") { - } else if (is_linux || is_chromeos) { - if (current_cpu == "x64") { - _dir = "x86_64-unknown-linux-gnu" -+ _suffix = "-x86_64" - } else if (current_cpu == "x86") { - _dir = "i386-unknown-linux-gnu" -+ _suffix = "-i386" - } else if (current_cpu == "arm") { - _dir = "armv7-unknown-linux-gnueabihf" - } else if (current_cpu == "arm64") { - _dir = "aarch64-unknown-linux-gnu" -+ _suffix = "-aarch64" - } else { - assert(false) # Unhandled cpu type - } -@@ -166,6 +169,15 @@ template("clang_lib") { - assert(false) # Unhandled target platform - } - -+ # Bit of a hack to make this find builtins from compiler-rt 16 -+ if (is_linux || is_chromeos) { -+ if (clang_version == "16") { -+ _dir = "linux" -+ } else { -+ _suffix = "" -+ } -+ } -+ - _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib" - _lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}" - libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ] diff --git a/compiler-rt-adjust-paths.patch b/compiler-rt-adjust-paths.patch new file mode 100644 index 0000000..0469220 --- /dev/null +++ b/compiler-rt-adjust-paths.patch @@ -0,0 +1,32 @@ +diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn +index d4de2e0cca0..57359c32121 100644 +--- a/build/config/clang/BUILD.gn ++++ b/build/config/clang/BUILD.gn +@@ -130,12 +130,15 @@ template("clang_lib") { + } else if (is_linux || is_chromeos) { + if (current_cpu == "x64") { + _dir = "x86_64-unknown-linux-gnu" ++ _suffix = "-x86_64" + } else if (current_cpu == "x86") { + _dir = "i386-unknown-linux-gnu" ++ _suffix = "-i386" + } else if (current_cpu == "arm") { + _dir = "armv7-unknown-linux-gnueabihf" + } else if (current_cpu == "arm64") { + _dir = "aarch64-unknown-linux-gnu" ++ _suffix = "-aarch64" + } else { + assert(false) # Unhandled cpu type + } +@@ -166,6 +169,11 @@ template("clang_lib") { + assert(false) # Unhandled target platform + } + ++ # Bit of a hack to make this find builtins from compiler-rt >= 16 ++ if (is_linux || is_chromeos) { ++ _dir = "linux" ++ } ++ + _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib" + _lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}" + libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ] diff --git a/drop-flag-unsupported-by-clang17.patch b/drop-flag-unsupported-by-clang17.patch new file mode 100644 index 0000000..a1412c9 --- /dev/null +++ b/drop-flag-unsupported-by-clang17.patch @@ -0,0 +1,29 @@ +diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn +index 89b4755ac8b3..94b457385663 100644 +--- a/build/config/compiler/BUILD.gn ++++ b/build/config/compiler/BUILD.gn +@@ -618,24 +618,6 @@ config("compiler") { + } + } + +- # TODO(crbug.com/1488374): This causes binary size growth and potentially +- # other problems. +- # TODO(crbug.com/1491036): This isn't supported by Cronet's mainline llvm version. +- if (default_toolchain != "//build/toolchain/cros:target" && +- !llvm_android_mainline) { +- cflags += [ +- "-mllvm", +- "-split-threshold-for-reg-with-hint=0", +- ] +- if (use_thin_lto && is_a_target_toolchain) { +- if (is_win) { +- ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ] +- } else { +- ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ] +- } +- } +- } +- + # TODO(crbug.com/1235145): Investigate why/if this should be needed. + if (is_win) { + cflags += [ "/clang:-ffp-contract=off" ] diff --git a/drop-flags-unsupported-by-clang16.patch b/drop-flags-unsupported-by-clang16.patch deleted file mode 100644 index a146a6d..0000000 --- a/drop-flags-unsupported-by-clang16.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index 89b4755ac8b3..94b457385663 100644 ---- a/build/config/compiler/BUILD.gn -+++ b/build/config/compiler/BUILD.gn -@@ -618,24 +618,6 @@ config("compiler") { - } - } - -- # TODO(crbug.com/1488374): This causes binary size growth and potentially -- # other problems. -- # TODO(crbug.com/1491036): This isn't supported by Cronet's mainline llvm version. -- if (default_toolchain != "//build/toolchain/cros:target" && -- !llvm_android_mainline) { -- cflags += [ -- "-mllvm", -- "-split-threshold-for-reg-with-hint=0", -- ] -- if (use_thin_lto && is_a_target_toolchain) { -- if (is_win) { -- ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ] -- } else { -- ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ] -- } -- } -- } -- - # TODO(crbug.com/1235145): Investigate why/if this should be needed. - if (is_win) { - cflags += [ "/clang:-ffp-contract=off" ] -@@ -802,10 +784,6 @@ config("compiler") { - if (is_apple) { - ldflags += [ "-Wcrl,object_path_lto" ] - } -- -- # We only use one version of LLVM within a build so there's no need to -- # upgrade debug info, which can be expensive since it runs the verifier. -- ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ] - } - - # TODO(https://crbug.com/1211155): investigate why this isn't effective on -- cgit v1.2.3