From fab72162bd2daa12f619f3bf0af629870602d1a6 Mon Sep 17 00:00:00 2001 From: suvari Date: Tue, 17 Aug 2021 01:27:56 +0300 Subject: [PATCH] chromium-browser: version bump to 92.0.4515.131 --- network/web/chromium-browser/actions.py | 23 ++++-- .../files/chromium-92-EnumTable-crash.patch | 71 +++++++++++++++++++ .../files/chromium-buildname.patch | 13 ++-- .../chromium-91-pcscan-vector-types.patch | 47 ------------ .../patches/chromium-92-v8-constexpr.patch | 17 +++++ .../patches/chromium-swiftshader-export.patch | 26 +++++++ network/web/chromium-browser/pspec.xml | 19 +++-- 7 files changed, 151 insertions(+), 65 deletions(-) create mode 100644 network/web/chromium-browser/files/chromium-92-EnumTable-crash.patch delete mode 100644 network/web/chromium-browser/files/patches/chromium-91-pcscan-vector-types.patch create mode 100644 network/web/chromium-browser/files/patches/chromium-92-v8-constexpr.patch create mode 100644 network/web/chromium-browser/files/patches/chromium-swiftshader-export.patch diff --git a/network/web/chromium-browser/actions.py b/network/web/chromium-browser/actions.py index f06e5476d4..fb7e1f543c 100644 --- a/network/web/chromium-browser/actions.py +++ b/network/web/chromium-browser/actions.py @@ -23,11 +23,11 @@ def setup(): shelltools.system("sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' tools/generate_shim_headers/generate_shim_headers.py") - for LIB in ["ffmpeg", "freetype", "flac", "fontconfig", "harfbuzz-ng", "libdrm", "libjpeg_turbo", "libpng", "libwebp", "libxml", "libxslt", "opus", "re2", "snappy", "zlib"]: + for LIB in ["ffmpeg", "freetype", "flac", "fontconfig", "harfbuzz-ng", "libdrm", "libjpeg_turbo", "libpng", "libwebp", "libxml", "libxslt", "opus", "snappy", "zlib"]: shelltools.system('find "third_party/%s" -type f \! -path "third_party/%s/chromium/*" \! -path "*third_party/%s/google/*" \! -path "third_party/harfbuzz-ng/utils/hb_scoped.h" \! -regex ".*\.\(gn\|gni\|isolate\)" -delete' %(LIB, LIB, LIB)) - shelltools.system("build/linux/unbundle/replace_gn_files.py --system-libraries ffmpeg freetype flac fontconfig harfbuzz-ng libdrm libjpeg libpng libwebp libxml libxslt re2 opus snappy zlib") + shelltools.system("build/linux/unbundle/replace_gn_files.py --system-libraries ffmpeg freetype flac fontconfig harfbuzz-ng libdrm libjpeg libpng libwebp libxml libxslt opus snappy zlib") shelltools.system("sed -i -e 's/\/malloc/' -e 's/\/free/' \ third_party/blink/renderer/core/xml/*.cc \ @@ -37,11 +37,10 @@ def setup(): opt = 'custom_toolchain="//build/toolchain/linux/unbundle:default" \ host_toolchain="//build/toolchain/linux/unbundle:default" \ use_sysroot=false \ - chrome_pgo_phase=0 \ enable_nacl=true \ enable_nacl_nonsfi=false \ rtc_use_pipewire=true \ - use_custom_libcxx=false \ + use_custom_libcxx=true \ clang_use_chrome_plugins=false \ is_official_build=true \ fieldtrial_testing_like_official_build=true \ @@ -65,9 +64,20 @@ def setup(): use_vaapi=true \ closure_compile=false \ symbol_level=0 \ + use_lld=true \ + chrome_pgo_phase=2 \ use_thin_lto=false \ - thin_lto_enable_optimizations=false \ - is_cfi=false' + is_cfi=false \ + enable_mse_mpeg2ts_stream_parser=true \ + enable_platform_dolby_vision=true \ + enable_platform_mpeg_h_audio=true \ + enable_platform_ac3_eac3_audio=true \ + enable_platform_hevc=true \ + use_aura=true \ + use_ozone=true \ + use_dbus=true \ + ozone_auto_platforms=false \ + ozone_platform_headless=true' @@ -87,6 +97,7 @@ def setup(): shelltools.export("CPPFLAGS", "-D__DATE__= -D__TIME__= -D__TIMESTAMP__=") shelltools.system("/usr/bin/python3 build/download_nacl_toolchains.py --packages nacl_x86_newlib,pnacl_newlib,pnacl_translator sync --extract") + shelltools.system("/usr/bin/python3 tools/update_pgo_profiles.py --target=linux update --gs-url-base=chromium-optimization-profiles/pgo_profiles") shelltools.system("/usr/bin/python3 tools/gn/bootstrap/bootstrap.py --gn-gen-args '%s'"% opt) shelltools.system("out/Release/gn gen out/Release --args='%s'"% opt) diff --git a/network/web/chromium-browser/files/chromium-92-EnumTable-crash.patch b/network/web/chromium-browser/files/chromium-92-EnumTable-crash.patch new file mode 100644 index 0000000000..7fb7360e02 --- /dev/null +++ b/network/web/chromium-browser/files/chromium-92-EnumTable-crash.patch @@ -0,0 +1,71 @@ +diff --git a/components/cast_channel/enum_table.h b/components/cast_channel/enum_table.h +index e3130c7..2ad16ea 100644 +--- a/components/cast_channel/enum_table.h ++++ b/components/cast_channel/enum_table.h +@@ -212,7 +212,7 @@ class + + template + friend class EnumTable; +- DISALLOW_COPY_AND_ASSIGN(GenericEnumTableEntry); ++ DISALLOW_ASSIGN(GenericEnumTableEntry); + }; + + // Yes, these constructors really needs to be inlined. Even though they look +@@ -250,8 +250,7 @@ class EnumTable { + // Constructor for regular entries. + constexpr Entry(E value, base::StringPiece str) + : GenericEnumTableEntry(static_cast(value), str) {} +- +- DISALLOW_COPY_AND_ASSIGN(Entry); ++ DISALLOW_ASSIGN(Entry); + }; + + static_assert(sizeof(E) <= sizeof(int32_t), +@@ -306,15 +305,14 @@ class EnumTable { + if (is_sorted_) { + const std::size_t index = static_cast(value); + if (ANALYZER_ASSUME_TRUE(index < data_.size())) { +- const auto& entry = data_.begin()[index]; ++ const auto& entry = data_[index]; + if (ANALYZER_ASSUME_TRUE(entry.has_str())) + return entry.str(); + } + return absl::nullopt; + } + return GenericEnumTableEntry::FindByValue( +- reinterpret_cast(data_.begin()), +- data_.size(), static_cast(value)); ++ &data_[0], data_.size(), static_cast(value)); + } + + // This overload of GetString is designed for cases where the argument is a +@@ -342,8 +340,7 @@ class EnumTable { + // enum value directly. + absl::optional GetEnum(base::StringPiece str) const { + auto* entry = GenericEnumTableEntry::FindByString( +- reinterpret_cast(data_.begin()), +- data_.size(), str); ++ &data_[0], data_.size(), str); + return entry ? static_cast(entry->value) : absl::optional(); + } + +@@ -358,7 +355,7 @@ class EnumTable { + // Align the data on a cache line boundary. + alignas(64) + #endif +- std::initializer_list data_; ++ const std::vector data_; + bool is_sorted_; + + constexpr EnumTable(std::initializer_list data, bool is_sorted) +@@ -370,8 +367,8 @@ class EnumTable { + + for (std::size_t i = 0; i < data.size(); i++) { + for (std::size_t j = i + 1; j < data.size(); j++) { +- const Entry& ei = data.begin()[i]; +- const Entry& ej = data.begin()[j]; ++ const Entry& ei = data[i]; ++ const Entry& ej = data[j]; + DCHECK(ei.value != ej.value) + << "Found duplicate enum values at indices " << i << " and " << j; + DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str())) diff --git a/network/web/chromium-browser/files/chromium-buildname.patch b/network/web/chromium-browser/files/chromium-buildname.patch index b608cfc3ed..0d484c0076 100644 --- a/network/web/chromium-browser/files/chromium-buildname.patch +++ b/network/web/chromium-browser/files/chromium-buildname.patch @@ -2,13 +2,12 @@ Index: chromium-73.0.3683.27/components/version_ui_strings.grdp =================================================================== --- chromium-73.0.3683.27.orig/components/version_ui_strings.grdp +++ chromium-73.0.3683.27/components/version_ui_strings.grdp -@@ -7,7 +7,7 @@ - Official Build +@@ -4,7 +4,7 @@ + About Version - -- Developer Build + +- Official Build + PisiLinux Build - - (32-bit) - + + Developer Build \ No newline at end of file diff --git a/network/web/chromium-browser/files/patches/chromium-91-pcscan-vector-types.patch b/network/web/chromium-browser/files/patches/chromium-91-pcscan-vector-types.patch deleted file mode 100644 index 33fc89e0c0..0000000000 --- a/network/web/chromium-browser/files/patches/chromium-91-pcscan-vector-types.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 429e6f78a88473208e96689afa2f6e91f07a4f8c Mon Sep 17 00:00:00 2001 -From: Stephan Hartmann -Date: Sat, 10 Apr 2021 17:02:49 +0000 -Subject: [PATCH] GCC: fix vector types in pcscan - - * _mm_cmpeq_epi64 result is __m128i - * maybe_ptrs is __m128i already and doesn't require cast - -Bug: 819294 -Change-Id: I3f8c6cc327191827838e80aea1431ac09315fe88 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2817544 -Reviewed-by: Anton Bikineev -Commit-Queue: Stephan Hartmann -Cr-Commit-Position: refs/heads/master@{#871265} ---- - -diff --git a/base/allocator/partition_allocator/starscan/pcscan.cc b/base/allocator/partition_allocator/starscan/pcscan.cc -index c7854ff..d5c0aea 100644 ---- a/base/allocator/partition_allocator/starscan/pcscan.cc -+++ b/base/allocator/partition_allocator/starscan/pcscan.cc -@@ -1143,7 +1143,7 @@ - const __m128i maybe_ptrs = - _mm_loadu_si128(reinterpret_cast<__m128i*>(payload)); - const __m128i vand = _mm_and_si128(maybe_ptrs, cage_mask); -- const __m128d vcmp = _mm_cmpeq_epi64(vand, vbase); -+ const __m128i vcmp = _mm_cmpeq_epi64(vand, vbase); - const int mask = _mm_movemask_pd(_mm_castsi128_pd(vcmp)); - if (LIKELY(!mask)) - continue; -@@ -1153,15 +1153,14 @@ - if (mask & 0b01) { - quarantine_size += - pcscan_task_.TryMarkObjectInNormalBuckets( -- _mm_cvtsi128_si64(_mm_castpd_si128(maybe_ptrs))); -+ _mm_cvtsi128_si64(maybe_ptrs)); - } - if (mask & 0b10) { - // Extraction intrinsics for qwords are only supported in SSE4.1, so - // instead we reshuffle dwords with pshufd. The mask is used to move the - // 4th and 3rd dwords into the second and first position. - static constexpr int kSecondWordMask = (3 << 2) | (2 << 0); -- const __m128i shuffled = -- _mm_shuffle_epi32(_mm_castpd_si128(maybe_ptrs), kSecondWordMask); -+ const __m128i shuffled = _mm_shuffle_epi32(maybe_ptrs, kSecondWordMask); - quarantine_size += - pcscan_task_.TryMarkObjectInNormalBuckets( - _mm_cvtsi128_si64(shuffled)); diff --git a/network/web/chromium-browser/files/patches/chromium-92-v8-constexpr.patch b/network/web/chromium-browser/files/patches/chromium-92-v8-constexpr.patch new file mode 100644 index 0000000000..cbe134773a --- /dev/null +++ b/network/web/chromium-browser/files/patches/chromium-92-v8-constexpr.patch @@ -0,0 +1,17 @@ +GCC: make VRegister::from_code() constexpr on aarch64 + +LiftoffRegister::gp() and LiftoffRegister::fp() are constexpr. +Therefore, VRegister::from_code() needs to be constexpr as well. +diff --git a/v8/src/codegen/arm64/register-arm64.h b/v8/src/codegen/arm64/register-arm64.h +index 1150daf..21007a5 100644 +--- a/v8/src/codegen/arm64/register-arm64.h ++++ b/v8/src/codegen/arm64/register-arm64.h +@@ -413,7 +413,7 @@ class VRegister : public CPURegister { + static constexpr int kMaxNumRegisters = kNumberOfVRegisters; + STATIC_ASSERT(kMaxNumRegisters == kDoubleAfterLast); + +- static VRegister from_code(int code) { ++ static constexpr VRegister from_code(int code) { + // Always return a D register. + return VRegister::Create(code, kDRegSizeInBits); + } diff --git a/network/web/chromium-browser/files/patches/chromium-swiftshader-export.patch b/network/web/chromium-browser/files/patches/chromium-swiftshader-export.patch new file mode 100644 index 0000000000..ced2fc15b8 --- /dev/null +++ b/network/web/chromium-browser/files/patches/chromium-swiftshader-export.patch @@ -0,0 +1,26 @@ +diff --git a/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn b/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn +index 1421911..cf86974 100644 +--- a/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn ++++ b/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn +@@ -42,7 +42,7 @@ config("swiftshader_libEGL_private_config") { + } else if (is_clang) { + defines += [ "EGLAPI=__attribute__((visibility(\"protected\"))) __attribute__((no_sanitize(\"function\")))" ] + } else { +- defines += [ "EGLAPI= " ] ++ defines += [ "EGLAPI=__attribute__((visibility(\"protected\")))" ] + } + } + } +diff --git a/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn b/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn +index f71dc68..fc3ba3a 100644 +--- a/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn ++++ b/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn +@@ -57,7 +57,7 @@ config("swiftshader_libGLESv2_private_config") { + } else if (is_clang) { + defines += [ "GL_APICALL=__attribute__((visibility(\"protected\"))) __attribute__((no_sanitize(\"function\")))" ] + } else { +- defines += [ "GL_APICALL= " ] ++ defines += [ "GL_APICALL=__attribute__((visibility(\"protected\")))" ] + } + } + } diff --git a/network/web/chromium-browser/pspec.xml b/network/web/chromium-browser/pspec.xml index 4f1606dc2a..69426aadb3 100644 --- a/network/web/chromium-browser/pspec.xml +++ b/network/web/chromium-browser/pspec.xml @@ -13,7 +13,7 @@ app:gui A WebKit powered web browser Chromium-browser is an open-source web browser, powered by WebKit. - http://gsdview.appspot.com/chromium-browser-official/chromium-91.0.4472.147.tar.xz + http://gsdview.appspot.com/chromium-browser-official/chromium-92.0.4515.131.tar.xz alsa-lib-devel at-spi2-atk-devel @@ -102,21 +102,23 @@ libevent-devel - + extend-enable-accelerated-video-decode-flag.patch - fix-crash-in-ThemeService.patch sql-make-VirtualCursor-standard-layout-type.patch use-oauth2-client-switches-as-default.patch + chromium-91-java-only-allowed-in-android-builds.patch chromium-buildname.patch wayland-egl.patch + chromium-92-EnumTable-crash.patch patches/chromium-78-protobuf-RepeatedPtrField-export.patch patches/chromium-90-ruy-include.patch patches/chromium-91-compiler.patch patches/chromium-91-libyuv-aarch64.patch - patches/chromium-91-pcscan-vector-types.patch + patches/chromium-92-v8-constexpr.patch + patches/chromium-swiftshader-export.patch @@ -198,6 +200,13 @@ + + 2021-08-16 + 92.0.4515.131 + Version Bump + İdris Kalp + idriskalp@gmail.com + 2021-07-07 91.0.4472.147 @@ -367,4 +376,4 @@ admin@pisilinux.org - \ No newline at end of file +