diff --git a/.gitignore b/.gitignore index 2e5133d2..fb9b0a11 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ /xcb-proto-1.14.tar.xz /NotoSansSymbols2-Regular.ttf /NotoSansTibetan-Regular.ttf +/node-v12.22.6-linux-arm64.tar.xz +/node-v12.22.6-linux-x64.tar.xz diff --git a/chromium-77.0.3865.75-gcc-include-memory.patch b/chromium-77.0.3865.75-gcc-include-memory.patch deleted file mode 100644 index 67b3b44c..00000000 --- a/chromium-77.0.3865.75-gcc-include-memory.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up chromium-77.0.3865.75/third_party/one_euro_filter/src/one_euro_filter.h.gcc-include-memory chromium-77.0.3865.75/third_party/one_euro_filter/src/one_euro_filter.h ---- chromium-77.0.3865.75/third_party/one_euro_filter/src/one_euro_filter.h.gcc-include-memory 2019-09-13 14:44:24.962770079 +0200 -+++ chromium-77.0.3865.75/third_party/one_euro_filter/src/one_euro_filter.h 2019-09-13 14:44:45.347073612 +0200 -@@ -3,6 +3,8 @@ - - #include "low_pass_filter.h" - -+#include -+ - namespace one_euro_filter { - namespace test { - class OneEuroFilterTest; -diff -up chromium-80.0.3987.106/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h.missing-memory chromium-80.0.3987.106/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h ---- chromium-80.0.3987.106/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h.missing-memory 2020-02-21 12:25:17.206021379 -0500 -+++ chromium-80.0.3987.106/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h 2020-02-21 12:25:31.613759976 -0500 -@@ -12,6 +12,7 @@ - #define MODULES_AUDIO_PROCESSING_AEC3_REVERB_MODEL_ESTIMATOR_H_ - - #include -+#include - #include - - #include "absl/types/optional.h" diff --git a/chromium-88.0.4324.182-gcc-fix-swiftshader-libEGL-visibility.patch b/chromium-88.0.4324.182-gcc-fix-swiftshader-libEGL-visibility.patch deleted file mode 100644 index d1bbe88a..00000000 --- a/chromium-88.0.4324.182-gcc-fix-swiftshader-libEGL-visibility.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -up chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn.gcc-swiftshader-visibility chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn ---- chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn.gcc-swiftshader-visibility 2021-02-25 16:31:51.929335783 +0000 -+++ chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn 2021-02-25 16:31:51.929335783 +0000 -@@ -42,7 +42,8 @@ config("swiftshader_libEGL_private_confi - } else if (is_clang) { - defines += [ "EGLAPI=__attribute__((visibility(\"protected\"))) __attribute__((no_sanitize(\"function\")))" ] - } else { -- defines += [ "EGLAPI= " ] -+ cflags += [ "-fvisibility=protected" ] -+ defines += [ "EGLAPI=__attribute__((visibility(\"protected\")))" ] - } - } - } -diff -up chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn.gcc-swiftshader-visibility chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn ---- chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn.gcc-swiftshader-visibility 2021-02-25 18:16:28.576901417 +0000 -+++ chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn 2021-02-25 18:17:50.356567690 +0000 -@@ -57,7 +57,8 @@ config("swiftshader_libGLESv2_private_co - } else if (is_clang) { - defines += [ "GL_APICALL=__attribute__((visibility(\"protected\"))) __attribute__((no_sanitize(\"function\")))" ] - } else { -- defines += [ "GL_APICALL= " ] -+ cflags += [ "-fvisibility=protected" ] -+ defines += [ "GL_APICALL=__attribute__((visibility(\"protected\")))" ] - } - } - } diff --git a/chromium-91-1190561-boo1186948.patch b/chromium-91-1190561-boo1186948.patch new file mode 100644 index 00000000..b9fd1f72 --- /dev/null +++ b/chromium-91-1190561-boo1186948.patch @@ -0,0 +1,45 @@ +From c2d0133f47afb59b4ce64e42215d1d053f15250a Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Tue, 13 Apr 2021 23:21:42 +0000 +Subject: [PATCH] fix crash in ThemeService + +ThemeSyncableService and ThemeService are owned by each other. On +destruction of ThemeService, ThemeSyncableService gets destructed as +well, but calls RemoveObserver of partly destructed ThemeService object. +To avoid already destructed |observers_| list, move it before +|theme_syncable_service_| definition. + +Bug: 1190561 +Change-Id: I4dc2c990d589071d97b7fa737afef54463c84751 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2821311 +Commit-Queue: Peter Kasting +Reviewed-by: Peter Kasting +Cr-Commit-Position: refs/heads/master@{#872164} +--- + chrome/browser/themes/theme_service.h | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h +index 592d40ae9de0f..337dfac9a040f 100644 +--- a/chrome/browser/themes/theme_service.h ++++ b/chrome/browser/themes/theme_service.h +@@ -299,6 +299,10 @@ class ThemeService : public KeyedService, + // The number of infobars currently displayed. + int number_of_reinstallers_ = 0; + ++ // Declared before |theme_syncable_service_|, because ThemeSyncableService ++ // removes itself from the |observers_| list on destruction. ++ base::ObserverList observers_; ++ + std::unique_ptr theme_syncable_service_; + + #if BUILDFLAG(ENABLE_EXTENSIONS) +@@ -320,8 +324,6 @@ class ThemeService : public KeyedService, + ScopedObserver + native_theme_observer_{this}; + +- base::ObserverList observers_; +- + base::WeakPtrFactory weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(ThemeService); diff --git a/chromium-92-clang-format.patch b/chromium-92-clang-format.patch new file mode 100644 index 00000000..0ba7ee2c --- /dev/null +++ b/chromium-92-clang-format.patch @@ -0,0 +1,25 @@ +--- a/buildtools/linux64/clang-format.orig 2021-08-23 09:18:56.269570955 +0200 ++++ b/buildtools/linux64/clang-format 2021-08-23 09:17:55.531190516 +0200 +@@ -10,9 +10,9 @@ + args = sys.argv[1:] + inputfiles = [a for a in args if not a.startswith('-')] + +-contents = '' ++contents = b'' + if '-' in args or not inputfiles: +- contents = sys.stdin.read() ++ contents = sys.stdin.buffer.read() + + # Tarball builds may or may not have depot_tools in $PATH. In the former case, + # running 'clang-format' will call back into this script infinitely. Strip off +@@ -34,8 +34,8 @@ + stdout, stderr = proc.communicate(input=contents) + # Ignore if clang-format fails. Eg: it may be too old to support C++14. + if proc.returncode == 0: +- sys.stdout.write(stdout) +- sys.stderr.write(stderr) ++ sys.stdout.buffer.write(stdout) ++ sys.stderr.buffer.write(stderr) + sys.exit(0) + except OSError: + # Ignore if clang-format is not installed. diff --git a/chromium-92-v8-constexpr.patch b/chromium-92-v8-constexpr.patch new file mode 100644 index 00000000..cbe13477 --- /dev/null +++ b/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/chromium-92.0.4515.107-EnumTable-crash.patch b/chromium-92.0.4515.107-EnumTable-crash.patch new file mode 100644 index 00000000..e9eaab6c --- /dev/null +++ b/chromium-92.0.4515.107-EnumTable-crash.patch @@ -0,0 +1,70 @@ +diff -up chromium-92.0.4515.107/components/cast_channel/enum_table.h.EnumTable-crash chromium-92.0.4515.107/components/cast_channel/enum_table.h +--- chromium-92.0.4515.107/components/cast_channel/enum_table.h.EnumTable-crash 2021-07-19 14:45:12.000000000 -0400 ++++ chromium-92.0.4515.107/components/cast_channel/enum_table.h 2021-07-26 17:41:21.987375385 -0400 +@@ -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/chromium-92.0.4515.107-gn-gcc-cleanup.patch b/chromium-92.0.4515.107-gn-gcc-cleanup.patch new file mode 100644 index 00000000..c61b51bd --- /dev/null +++ b/chromium-92.0.4515.107-gn-gcc-cleanup.patch @@ -0,0 +1,45 @@ +diff -up chromium-92.0.4515.107/tools/gn/src/gn/err.h.gn-gcc-cleanup chromium-92.0.4515.107/tools/gn/src/gn/err.h +--- chromium-92.0.4515.107/tools/gn/src/gn/err.h.gn-gcc-cleanup 2021-07-19 14:54:04.000000000 -0400 ++++ chromium-92.0.4515.107/tools/gn/src/gn/err.h 2021-07-26 17:23:54.477420431 -0400 +@@ -56,7 +56,7 @@ class Err { + const std::string& help_text = std::string()); + + Err(const Err& other); +- ++ Err& operator=(const Err& other) = default; + ~Err(); + + bool has_error() const { return has_error_; } +diff -up chromium-92.0.4515.107/tools/gn/src/gn/label_pattern.h.gn-gcc-cleanup chromium-92.0.4515.107/tools/gn/src/gn/label_pattern.h +--- chromium-92.0.4515.107/tools/gn/src/gn/label_pattern.h.gn-gcc-cleanup 2021-07-26 17:23:54.478420447 -0400 ++++ chromium-92.0.4515.107/tools/gn/src/gn/label_pattern.h 2021-07-26 17:26:36.904894419 -0400 +@@ -33,6 +33,7 @@ class LabelPattern { + std::string_view name, + const Label& toolchain_label); + LabelPattern(const LabelPattern& other); ++ LabelPattern& operator=(const LabelPattern& other) = default; + ~LabelPattern(); + + // Converts the given input string to a pattern. This does special stuff +diff -up chromium-92.0.4515.107/tools/gn/src/gn/substitution_list.h.gn-gcc-cleanup chromium-92.0.4515.107/tools/gn/src/gn/substitution_list.h +--- chromium-92.0.4515.107/tools/gn/src/gn/substitution_list.h.gn-gcc-cleanup 2021-07-19 14:54:04.000000000 -0400 ++++ chromium-92.0.4515.107/tools/gn/src/gn/substitution_list.h 2021-07-26 17:23:54.478420447 -0400 +@@ -15,6 +15,7 @@ class SubstitutionList { + public: + SubstitutionList(); + SubstitutionList(const SubstitutionList& other); ++ SubstitutionList& operator=(const SubstitutionList& other) = default; + ~SubstitutionList(); + + bool Parse(const Value& value, Err* err); +diff -up chromium-92.0.4515.107/tools/gn/src/gn/substitution_pattern.h.gn-gcc-cleanup chromium-92.0.4515.107/tools/gn/src/gn/substitution_pattern.h +--- chromium-92.0.4515.107/tools/gn/src/gn/substitution_pattern.h.gn-gcc-cleanup 2021-07-19 14:54:04.000000000 -0400 ++++ chromium-92.0.4515.107/tools/gn/src/gn/substitution_pattern.h 2021-07-26 17:23:54.478420447 -0400 +@@ -35,6 +35,7 @@ class SubstitutionPattern { + + SubstitutionPattern(); + SubstitutionPattern(const SubstitutionPattern& other); ++ SubstitutionPattern& operator=(const SubstitutionPattern& other) = default; + ~SubstitutionPattern(); + + // Parses the given string and fills in the pattern. The pattern must only diff --git a/chromium-92.0.4515.107-norar.patch b/chromium-92.0.4515.107-norar.patch new file mode 100644 index 00000000..311caf68 --- /dev/null +++ b/chromium-92.0.4515.107-norar.patch @@ -0,0 +1,90 @@ +diff -up chromium-92.0.4515.107/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-92.0.4515.107/chrome/common/safe_browsing/BUILD.gn +--- chromium-92.0.4515.107/chrome/common/safe_browsing/BUILD.gn.nounrar 2021-07-19 14:45:10.000000000 -0400 ++++ chromium-92.0.4515.107/chrome/common/safe_browsing/BUILD.gn 2021-07-26 16:44:53.670761825 -0400 +@@ -43,39 +43,6 @@ if (safe_browsing_mode == 1) { + public_deps = [ "//components/safe_browsing/core:csd_proto" ] + } + +- source_set("rar_analyzer") { +- sources = [ +- "rar_analyzer.cc", +- "rar_analyzer.h", +- ] +- +- deps = [ +- ":archive_analyzer_results", +- ":download_type_util", +- "//base", +- "//base:i18n", +- "//components/safe_browsing/core:features", +- "//components/safe_browsing/core:file_type_policies", +- "//third_party/unrar:unrar", +- ] +- +- defines = [ +- "_FILE_OFFSET_BITS=64", +- "LARGEFILE_SOURCE", +- "RAR_SMP", +- "SILENT", +- +- # The following is set to disable certain macro definitions in the unrar +- # source code. +- "CHROMIUM_UNRAR", +- +- # Disables exceptions in unrar, replaces them with process termination. +- "UNRAR_NO_EXCEPTIONS", +- ] +- +- public_deps = [ "//components/safe_browsing/core:csd_proto" ] +- } +- + if (is_mac) { + source_set("disk_image_type_sniffer_mac") { + sources = [ +@@ -145,7 +112,6 @@ source_set("safe_browsing") { + ":archive_analyzer_results", + ":binary_feature_extractor", + ":download_type_util", +- ":rar_analyzer", + "//components/safe_browsing/core:features", + ] + +diff -up chromium-92.0.4515.107/chrome/common/safe_browsing/DEPS.nounrar chromium-92.0.4515.107/chrome/common/safe_browsing/DEPS +--- chromium-92.0.4515.107/chrome/common/safe_browsing/DEPS.nounrar 2021-07-19 14:45:10.000000000 -0400 ++++ chromium-92.0.4515.107/chrome/common/safe_browsing/DEPS 2021-07-26 16:44:53.670761825 -0400 +@@ -1,6 +1,5 @@ + include_rules = [ + "+components/safe_browsing", + "+third_party/protobuf", +- "+third_party/unrar", + "+third_party/zlib", + ] +diff -up chromium-92.0.4515.107/chrome/services/file_util/BUILD.gn.nounrar chromium-92.0.4515.107/chrome/services/file_util/BUILD.gn +--- chromium-92.0.4515.107/chrome/services/file_util/BUILD.gn.nounrar 2021-07-26 16:44:53.670761825 -0400 ++++ chromium-92.0.4515.107/chrome/services/file_util/BUILD.gn 2021-07-26 16:48:21.283924750 -0400 +@@ -50,7 +50,6 @@ source_set("file_util") { + deps += [ + "//chrome/common/safe_browsing", + "//chrome/common/safe_browsing:archive_analyzer_results", +- "//chrome/common/safe_browsing:rar_analyzer", + ] + } + +diff -up chromium-92.0.4515.107/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-92.0.4515.107/chrome/services/file_util/safe_archive_analyzer.cc +--- chromium-92.0.4515.107/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2021-07-19 14:45:11.000000000 -0400 ++++ chromium-92.0.4515.107/chrome/services/file_util/safe_archive_analyzer.cc 2021-07-26 16:44:53.670761825 -0400 +@@ -45,10 +45,14 @@ void SafeArchiveAnalyzer::AnalyzeDmgFile + void SafeArchiveAnalyzer::AnalyzeRarFile(base::File rar_file, + base::File temporary_file, + AnalyzeRarFileCallback callback) { ++#if 0 + DCHECK(rar_file.IsValid()); + + safe_browsing::ArchiveAnalyzerResults results; + safe_browsing::rar_analyzer::AnalyzeRarFile( + std::move(rar_file), std::move(temporary_file), &results); + std::move(callback).Run(results); ++#else ++ NOTREACHED(); ++#endif + } diff --git a/chromium-92.0.4515.107-py2-bootstrap.patch b/chromium-92.0.4515.107-py2-bootstrap.patch new file mode 100644 index 00000000..ea09033f --- /dev/null +++ b/chromium-92.0.4515.107-py2-bootstrap.patch @@ -0,0 +1,24 @@ +diff -up chromium-92.0.4515.107/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py.py2 chromium-92.0.4515.107/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py +--- chromium-92.0.4515.107/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py.py2 2021-07-19 14:47:19.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py 2021-07-26 17:02:23.160750472 -0400 +@@ -83,7 +83,7 @@ def _MinifyJS(input_js): + + with tempfile.NamedTemporaryFile() as _: + args = [ +- 'python', ++ 'python2', + rjsmin_path + ] + p = subprocess.Popen(args, +diff -up chromium-92.0.4515.107/tools/gn/bootstrap/bootstrap.py.py2 chromium-92.0.4515.107/tools/gn/bootstrap/bootstrap.py +--- chromium-92.0.4515.107/tools/gn/bootstrap/bootstrap.py.py2 2021-07-19 14:45:43.000000000 -0400 ++++ chromium-92.0.4515.107/tools/gn/bootstrap/bootstrap.py 2021-07-26 17:02:23.160750472 -0400 +@@ -130,7 +130,7 @@ def main(argv): + if not options.debug: + gn_gen_args += ' is_debug=false' + subprocess.check_call([ +- gn_path, 'gen', out_dir, ++ gn_path, 'gen', out_dir, ' --script-executable=/usr/bin/python2', + '--args=%s' % gn_gen_args, "--root=" + SRC_ROOT + ]) + diff --git a/chromium-92.0.4515.107-py3-bootstrap.patch b/chromium-92.0.4515.107-py3-bootstrap.patch new file mode 100644 index 00000000..84558138 --- /dev/null +++ b/chromium-92.0.4515.107-py3-bootstrap.patch @@ -0,0 +1,24 @@ +diff -up chromium-92.0.4515.107/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py.py2 chromium-92.0.4515.107/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py +--- chromium-92.0.4515.107/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py.py2 2021-07-19 14:47:19.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py 2021-07-26 17:02:23.160750472 -0400 +@@ -83,7 +83,7 @@ def _MinifyJS(input_js): + + with tempfile.NamedTemporaryFile() as _: + args = [ +- 'python', ++ 'python3', + rjsmin_path + ] + p = subprocess.Popen(args, +diff -up chromium-92.0.4515.107/tools/gn/bootstrap/bootstrap.py.py2 chromium-92.0.4515.107/tools/gn/bootstrap/bootstrap.py +--- chromium-92.0.4515.107/tools/gn/bootstrap/bootstrap.py.py2 2021-07-19 14:45:43.000000000 -0400 ++++ chromium-92.0.4515.107/tools/gn/bootstrap/bootstrap.py 2021-07-26 17:02:23.160750472 -0400 +@@ -130,7 +130,7 @@ def main(argv): + if not options.debug: + gn_gen_args += ' is_debug=false' + subprocess.check_call([ +- gn_path, 'gen', out_dir, ++ gn_path, 'gen', out_dir, ' --script-executable=/usr/bin/python3', + '--args=%s' % gn_gen_args, "--root=" + SRC_ROOT + ]) + diff --git a/chromium-92.0.4515.107-py3-fixes.patch b/chromium-92.0.4515.107-py3-fixes.patch new file mode 100644 index 00000000..81ae7f68 --- /dev/null +++ b/chromium-92.0.4515.107-py3-fixes.patch @@ -0,0 +1,17 @@ +diff -up chromium-92.0.4515.107/third_party/jinja2/tests.py.py3 chromium-92.0.4515.107/third_party/jinja2/tests.py +--- chromium-92.0.4515.107/third_party/jinja2/tests.py.py3 2021-07-28 15:53:45.670961029 -0400 ++++ chromium-92.0.4515.107/third_party/jinja2/tests.py 2021-07-28 15:55:56.637013096 -0400 +@@ -10,7 +10,12 @@ + """ + import operator + import re +-from collections import Mapping ++import sys ++if sys.version_info[:2] >= (3, 8): # pragma: no cover ++ from collections.abc import Mapping ++else: # pragma: no cover ++ from collections import Mapping ++ + from jinja2.runtime import Undefined + from jinja2._compat import text_type, string_types, integer_types + import decimal diff --git a/chromium-92.0.4515.107-rawhide-gcc-std-max-fix.patch b/chromium-92.0.4515.107-rawhide-gcc-std-max-fix.patch new file mode 100644 index 00000000..bfe17b9c --- /dev/null +++ b/chromium-92.0.4515.107-rawhide-gcc-std-max-fix.patch @@ -0,0 +1,13 @@ +diff -up chromium-92.0.4515.107/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc.sigstkszfix chromium-92.0.4515.107/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc +diff -up chromium-92.0.4515.107/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.sigstkszfix chromium-92.0.4515.107/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +--- chromium-92.0.4515.107/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.sigstkszfix 2021-07-19 14:47:20.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2021-07-26 17:28:50.155924005 -0400 +@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { + // SIGSTKSZ may be too small to prevent the signal handlers from overrunning + // the alternative stack. Ensure that the size of the alternative stack is + // large enough. +- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); ++ static const unsigned kSigStackSize = std::max(static_cast(16384), SIGSTKSZ); + + // Only set an alternative stack if there isn't already one, or if the current + // one is too small. diff --git a/chromium-92.0.4515.107-rhel8-force-disable-use_gnome_keyring.patch b/chromium-92.0.4515.107-rhel8-force-disable-use_gnome_keyring.patch new file mode 100644 index 00000000..9724c44b --- /dev/null +++ b/chromium-92.0.4515.107-rhel8-force-disable-use_gnome_keyring.patch @@ -0,0 +1,12 @@ +diff -up chromium-92.0.4515.107/components/os_crypt/features.gni.disblegnomekeyring chromium-92.0.4515.107/components/os_crypt/features.gni +--- chromium-92.0.4515.107/components/os_crypt/features.gni.disblegnomekeyring 2021-07-26 22:31:54.887207201 -0400 ++++ chromium-92.0.4515.107/components/os_crypt/features.gni 2021-07-26 22:35:00.879013268 -0400 +@@ -8,7 +8,7 @@ import("//build/config/ui.gni") + declare_args() { + # Whether to use libgnome-keyring (deprecated by libsecret). + # See http://crbug.com/466975 and http://crbug.com/355223. +- use_gnome_keyring = (is_linux || is_chromeos_lacros) && use_glib ++ use_gnome_keyring = false + + # Whether to make account and service names for the crypto key storage + # configurable at runtime for embedders. diff --git a/chromium-92.0.4515.107-sandbox-clone3.patch b/chromium-92.0.4515.107-sandbox-clone3.patch new file mode 100644 index 00000000..a4399357 --- /dev/null +++ b/chromium-92.0.4515.107-sandbox-clone3.patch @@ -0,0 +1,16 @@ +diff -up chromium-92.0.4515.107/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.clone3 chromium-92.0.4515.107/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +--- chromium-92.0.4515.107/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.clone3 2021-08-16 09:05:35.836277326 -0400 ++++ chromium-92.0.4515.107/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-08-16 09:06:17.420502628 -0400 +@@ -178,6 +178,12 @@ ResultExpr EvaluateSyscallImpl(int fs_de + return RestrictCloneToThreadsAndEPERMFork(); + } + ++ // clone3 takes a pointer argument which we cannot examine, so return ENOSYS ++ // to force the libc to use clone. See https://crbug.com/1213452. ++ if (sysno == __NR_clone3) { ++ return Error(ENOSYS); ++ } ++ + if (sysno == __NR_fcntl) + return RestrictFcntlCommands(); + diff --git a/chromium-92.0.4515.107-update-highway-0.12.2.patch b/chromium-92.0.4515.107-update-highway-0.12.2.patch new file mode 100644 index 00000000..fca308b6 --- /dev/null +++ b/chromium-92.0.4515.107-update-highway-0.12.2.patch @@ -0,0 +1,4199 @@ +diff -up chromium-92.0.4515.107/third_party/highway/src/CMakeLists.txt.in.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/CMakeLists.txt.in +diff -up chromium-92.0.4515.107/third_party/highway/src/CMakeLists.txt.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/CMakeLists.txt +--- chromium-92.0.4515.107/third_party/highway/src/CMakeLists.txt.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/CMakeLists.txt 2021-07-26 17:13:36.158002603 -0400 +@@ -19,7 +19,7 @@ if(POLICY CMP0083) + cmake_policy(SET CMP0083 NEW) + endif() + +-project(hwy VERSION 0.1) ++project(hwy VERSION 0.12.2) # Keep in sync with highway.h version + + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_EXTENSIONS OFF) +@@ -40,6 +40,8 @@ if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE RelWithDebInfo) + endif() + ++set(HWY_CMAKE_ARM7 OFF CACHE BOOL "Set copts for ARMv7 with NEON?") ++ + include(CheckCXXSourceCompiles) + check_cxx_source_compiles( + "int main() { +@@ -51,10 +53,13 @@ check_cxx_source_compiles( + HWY_EMSCRIPTEN + ) + ++set(HWY_CONTRIB_SOURCES ++ hwy/contrib/image/image.cc ++ hwy/contrib/image/image.h ++ hwy/contrib/math/math-inl.h ++) ++ + set(HWY_SOURCES +- contrib/image/image.cc +- contrib/image/image.h +- contrib/math/math-inl.h + hwy/aligned_allocator.cc + hwy/aligned_allocator.h + hwy/base.h +@@ -64,6 +69,7 @@ set(HWY_SOURCES + hwy/nanobenchmark.cc + hwy/nanobenchmark.h + hwy/ops/arm_neon-inl.h ++ hwy/ops/arm_sve-inl.h + hwy/ops/scalar-inl.h + hwy/ops/set_macros-inl.h + hwy/ops/shared-inl.h +@@ -146,13 +152,28 @@ else() + -fno-exceptions + ) + endif() +-endif() ++ ++ if (HWY_CMAKE_ARM7) ++ list(APPEND HWY_FLAGS ++ -march=armv7-a ++ -mfpu=neon-vfpv4 ++ -mfloat-abi=hard # must match the toolchain specified as CXX= ++ -mfp16-format=ieee # required for vcvt_f32_f16 ++ ) ++ endif() # HWY_CMAKE_ARM7 ++ ++endif() # !MSVC + + add_library(hwy STATIC ${HWY_SOURCES}) + target_compile_options(hwy PRIVATE ${HWY_FLAGS}) + set_property(TARGET hwy PROPERTY POSITION_INDEPENDENT_CODE ON) + target_include_directories(hwy PUBLIC ${CMAKE_CURRENT_LIST_DIR}) + ++add_library(hwy_contrib STATIC ${HWY_CONTRIB_SOURCES}) ++target_compile_options(hwy_contrib PRIVATE ${HWY_FLAGS}) ++set_property(TARGET hwy_contrib PROPERTY POSITION_INDEPENDENT_CODE ON) ++target_include_directories(hwy_contrib PUBLIC ${CMAKE_CURRENT_LIST_DIR}) ++ + # -------------------------------------------------------- install library + install(TARGETS hwy + DESTINATION "${CMAKE_INSTALL_LIBDIR}") +@@ -166,9 +187,21 @@ foreach (source ${HWY_SOURCES}) + endif() + endforeach() + +-# Add a pkg-config file for libhwy and the test library. ++install(TARGETS hwy_contrib ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++# Install all the headers keeping the relative path to the current directory ++# when installing them. ++foreach (source ${HWY_CONTRIB_SOURCES}) ++ if ("${source}" MATCHES "\.h$") ++ get_filename_component(dirname "${source}" DIRECTORY) ++ install(FILES "${source}" ++ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${dirname}") ++ endif() ++endforeach() ++ ++# Add a pkg-config file for libhwy and the contrib/test libraries. + set(HWY_LIBRARY_VERSION "${CMAKE_PROJECT_VERSION}") +-foreach (pc libhwy.pc libhwy-test.pc) ++foreach (pc libhwy.pc libhwy-contrib.pc libhwy-test.pc) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${pc}.in" "${pc}" @ONLY) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${pc}" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") +@@ -251,8 +284,8 @@ endif() + endif() # HWY_SYSTEM_GTEST + + set(HWY_TEST_FILES +- contrib/image/image_test.cc +- # contrib/math/math_test.cc ++ hwy/contrib/image/image_test.cc ++ # hwy/contrib/math/math_test.cc + hwy/aligned_allocator_test.cc + hwy/base_test.cc + hwy/highway_test.cc +@@ -274,11 +307,16 @@ foreach (TESTFILE IN LISTS HWY_TEST_FILE + get_filename_component(TESTNAME ${TESTFILE} NAME_WE) + add_executable(${TESTNAME} ${TESTFILE}) + target_compile_options(${TESTNAME} PRIVATE ${HWY_FLAGS}) ++ # Test all targets, not just the best/baseline. This changes the default ++ # policy to all-attainable; note that setting -DHWY_COMPILE_* directly can ++ # cause compile errors because only one may be set, and other CMakeLists.txt ++ # that include us may set them. ++ target_compile_options(${TESTNAME} PRIVATE -DHWY_IS_TEST=1) + + if(HWY_SYSTEM_GTEST) +- target_link_libraries(${TESTNAME} hwy GTest::GTest GTest::Main) ++ target_link_libraries(${TESTNAME} hwy hwy_contrib GTest::GTest GTest::Main) + else() +- target_link_libraries(${TESTNAME} hwy gtest gtest_main) ++ target_link_libraries(${TESTNAME} hwy hwy_contrib gtest gtest_main) + endif() + # Output test targets in the test directory. + set_target_properties(${TESTNAME} PROPERTIES PREFIX "tests/") +diff -up chromium-92.0.4515.107/third_party/highway/src/debian/changelog.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/debian/changelog +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/aligned_allocator.h.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/aligned_allocator.h +--- chromium-92.0.4515.107/third_party/highway/src/hwy/aligned_allocator.h.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/aligned_allocator.h 2021-07-26 17:15:37.281847484 -0400 +@@ -111,6 +111,32 @@ AlignedUniquePtr MakeUniqueAligned(Ar + new (ptr) T(std::forward(args)...), AlignedDeleter()); + } + ++// Helpers for array allocators (avoids overflow) ++namespace detail { ++ ++// Returns x such that 1u << x == n (if n is a power of two). ++static inline constexpr size_t ShiftCount(size_t n) { ++ return (n <= 1) ? 0 : 1 + ShiftCount(n / 2); ++} ++ ++template ++T* AllocateAlignedItems(size_t items, AllocPtr alloc_ptr, void* opaque_ptr) { ++ constexpr size_t size = sizeof(T); ++ ++ constexpr bool is_pow2 = (size & (size - 1)) == 0; ++ constexpr size_t bits = ShiftCount(size); ++ static_assert(!is_pow2 || (1ull << bits) == size, "ShiftCount is incorrect"); ++ ++ const size_t bytes = is_pow2 ? items << bits : items * size; ++ const size_t check = is_pow2 ? bytes >> bits : bytes / size; ++ if (check != items) { ++ return nullptr; // overflowed ++ } ++ return static_cast(AllocateAlignedBytes(bytes, alloc_ptr, opaque_ptr)); ++} ++ ++} // namespace detail ++ + // Aligned memory equivalent of make_unique for array types using the + // custom allocators alloc/free. This function calls the constructor with the + // passed Args... on every created item. The destructor of each element will be +@@ -118,10 +144,11 @@ AlignedUniquePtr MakeUniqueAligned(Ar + template + AlignedUniquePtr MakeUniqueAlignedArrayWithAlloc( + size_t items, AllocPtr alloc, FreePtr free, void* opaque, Args&&... args) { +- T* ptr = +- static_cast(AllocateAlignedBytes(items * sizeof(T), alloc, opaque)); +- for (size_t i = 0; i < items; i++) { +- new (ptr + i) T(std::forward(args)...); ++ T* ptr = detail::AllocateAlignedItems(items, alloc, opaque); ++ if (ptr != nullptr) { ++ for (size_t i = 0; i < items; i++) { ++ new (ptr + i) T(std::forward(args)...); ++ } + } + return AlignedUniquePtr(ptr, AlignedDeleter(free, opaque)); + } +@@ -165,7 +192,7 @@ template + AlignedFreeUniquePtr AllocateAligned(const size_t items, AllocPtr alloc, + FreePtr free, void* opaque) { + return AlignedFreeUniquePtr( +- static_cast(AllocateAlignedBytes(items * sizeof(T), alloc, opaque)), ++ detail::AllocateAlignedItems(items, alloc, opaque), + AlignedFreer(free, opaque)); + } + +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/aligned_allocator_test.cc.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/aligned_allocator_test.cc +--- chromium-92.0.4515.107/third_party/highway/src/hwy/aligned_allocator_test.cc.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/aligned_allocator_test.cc 2021-07-26 17:16:43.672858709 -0400 +@@ -16,6 +16,7 @@ + + #include + ++#include + #include + #include + #include +@@ -87,6 +88,32 @@ TEST(AlignedAllocatorTest, FreeNullptr) + /*opaque_ptr=*/nullptr); + } + ++TEST(AlignedAllocatorTest, Log2) { ++ EXPECT_EQ(0u, detail::ShiftCount(1)); ++ EXPECT_EQ(1u, detail::ShiftCount(2)); ++ EXPECT_EQ(3u, detail::ShiftCount(8)); ++} ++ ++// Allocator returns null when it detects overflow of items * sizeof(T). ++TEST(AlignedAllocatorTest, Overflow) { ++ constexpr size_t max = ~size_t(0); ++ constexpr size_t msb = (max >> 1) + 1; ++ using Size5 = std::array; ++ using Size10 = std::array; ++ EXPECT_EQ(nullptr, ++ detail::AllocateAlignedItems(max / 2, nullptr, nullptr)); ++ EXPECT_EQ(nullptr, ++ detail::AllocateAlignedItems(max / 3, nullptr, nullptr)); ++ EXPECT_EQ(nullptr, ++ detail::AllocateAlignedItems(max / 4, nullptr, nullptr)); ++ EXPECT_EQ(nullptr, ++ detail::AllocateAlignedItems(msb, nullptr, nullptr)); ++ EXPECT_EQ(nullptr, ++ detail::AllocateAlignedItems(msb + 1, nullptr, nullptr)); ++ EXPECT_EQ(nullptr, ++ detail::AllocateAlignedItems(msb / 4, nullptr, nullptr)); ++} ++ + TEST(AlignedAllocatorTest, AllocDefaultPointers) { + const size_t kSize = 7777; + void* ptr = AllocateAlignedBytes(kSize, /*alloc_ptr=*/nullptr, +@@ -215,7 +242,8 @@ TEST(AlignedAllocatorTest, MakeUniqueAli + auto arr = MakeUniqueAlignedArrayWithAlloc>( + 7, FakeAllocator::StaticAlloc, FakeAllocator::StaticFree, &fake_alloc, + &counter); +- // An array shold still only call a single allocation. ++ ASSERT_NE(nullptr, arr.get()); ++ // An array should still only call a single allocation. + EXPECT_EQ(1u, fake_alloc.PendingAllocs()); + EXPECT_EQ(7, counter); + for (size_t i = 0; i < 7; i++) { +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/base.h.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/base.h +--- chromium-92.0.4515.107/third_party/highway/src/hwy/base.h.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/base.h 2021-07-26 17:16:04.753265910 -0400 +@@ -203,6 +203,10 @@ + #define HWY_ARCH_X86_64 0 + #endif + ++#if HWY_ARCH_X86_32 && HWY_ARCH_X86_64 ++#error "Cannot have both x86-32 and x86-64" ++#endif ++ + #if HWY_ARCH_X86_32 || HWY_ARCH_X86_64 + #define HWY_ARCH_X86 1 + #else +@@ -249,9 +253,11 @@ + #define HWY_ARCH_RVV 0 + #endif + ++// It is an error to detect multiple architectures at the same time, but OK to ++// detect none of the above. + #if (HWY_ARCH_X86 + HWY_ARCH_PPC + HWY_ARCH_ARM + HWY_ARCH_WASM + \ +- HWY_ARCH_RVV) != 1 +-#error "Must detect exactly one platform" ++ HWY_ARCH_RVV) > 1 ++#error "Must not detect more than one architecture" + #endif + + //------------------------------------------------------------------------------ +@@ -328,6 +334,12 @@ static constexpr HWY_MAYBE_UNUSED size_t + + // RVV already has a builtin type and the GCC intrinsics require it. + #if HWY_ARCH_RVV && HWY_COMPILER_GCC ++#define HWY_NATIVE_FLOAT16 1 ++#else ++#define HWY_NATIVE_FLOAT16 0 ++#endif ++ ++#if HWY_NATIVE_FLOAT16 + using float16_t = __fp16; + // Clang does not allow __fp16 arguments, but scalar.h requires LaneType + // arguments, so use a wrapper. +@@ -597,7 +609,7 @@ HWY_API size_t PopCount(uint64_t x) { + return static_cast(__builtin_popcountll(x)); + #elif HWY_COMPILER_MSVC && HWY_ARCH_X86_64 + return _mm_popcnt_u64(x); +-#elif HWY_COMPILER_MSVC ++#elif HWY_COMPILER_MSVC && HWY_ARCH_X86_32 + return _mm_popcnt_u32(uint32_t(x)) + _mm_popcnt_u32(uint32_t(x >> 32)); + #else + x -= ((x >> 1) & 0x55555555U); +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/cache_control.h.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/cache_control.h +--- chromium-92.0.4515.107/third_party/highway/src/hwy/cache_control.h.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/cache_control.h 2021-07-26 17:16:26.004589594 -0400 +@@ -32,6 +32,14 @@ + #include // SSE2 + #endif + ++// Windows.h #defines these, which causes infinite recursion. Temporarily ++// undefine them in this header; these functions are anyway deprecated. ++// TODO(janwas): remove when these functions are removed. ++#pragma push_macro("LoadFence") ++#pragma push_macro("StoreFence") ++#undef LoadFence ++#undef StoreFence ++ + namespace hwy { + + // Even if N*sizeof(T) is smaller, Stream may write a multiple of this size. +@@ -83,6 +91,17 @@ HWY_INLINE HWY_ATTR_CACHE void FlushCach + #endif + } + ++// Reduces power consumption in spin-loops. No effect on non-x86. ++HWY_INLINE HWY_ATTR_CACHE void Pause() { ++#if HWY_ARCH_X86 && !defined(HWY_DISABLE_CACHE_CONTROL) ++ _mm_pause(); ++#endif ++} ++ + } // namespace hwy + ++// TODO(janwas): remove when these functions are removed. (See above.) ++#pragma pop_macro("StoreFence") ++#pragma pop_macro("LoadFence") ++ + #endif // HIGHWAY_HWY_CACHE_CONTROL_H_ +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/examples/skeleton.cc.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/examples/skeleton.cc +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/examples/skeleton_test.cc.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/examples/skeleton_test.cc +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/highway.h.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/highway.h +--- chromium-92.0.4515.107/third_party/highway/src/hwy/highway.h.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/highway.h 2021-07-26 17:16:58.109078590 -0400 +@@ -25,10 +25,10 @@ + + namespace hwy { + +-// API version (https://semver.org/) ++// API version (https://semver.org/); keep in sync with CMakeLists.txt. + #define HWY_MAJOR 0 + #define HWY_MINOR 12 +-#define HWY_PATCH 0 ++#define HWY_PATCH 2 + + //------------------------------------------------------------------------------ + // Shorthand for descriptors (defined in shared-inl.h) used to select overloads. +@@ -49,7 +49,7 @@ namespace hwy { + HWY_FULL_RECOMPOSER((__VA_ARGS__, HWY_FULL2, HWY_FULL1, )) + #define HWY_FULL(...) HWY_CHOOSE_FULL(__VA_ARGS__())(__VA_ARGS__) + +-// Vector of up to MAX_N lanes. ++// Vector of up to MAX_N lanes. Discouraged, when possible, use Half<> instead. + #define HWY_CAPPED(T, MAX_N) \ + hwy::HWY_NAMESPACE::Simd + +@@ -75,6 +75,10 @@ namespace hwy { + #define HWY_STATIC_DISPATCH(FUNC_NAME) N_WASM::FUNC_NAME + #elif HWY_STATIC_TARGET == HWY_NEON + #define HWY_STATIC_DISPATCH(FUNC_NAME) N_NEON::FUNC_NAME ++#elif HWY_STATIC_TARGET == HWY_SVE ++#define HWY_STATIC_DISPATCH(FUNC_NAME) N_SVE::FUNC_NAME ++#elif HWY_STATIC_TARGET == HWY_SVE2 ++#define HWY_STATIC_DISPATCH(FUNC_NAME) N_SVE2::FUNC_NAME + #elif HWY_STATIC_TARGET == HWY_PPC8 + #define HWY_STATIC_DISPATCH(FUNC_NAME) N_PPC8::FUNC_NAME + #elif HWY_STATIC_TARGET == HWY_SSE4 +@@ -143,6 +147,18 @@ FunctionCache Function + #define HWY_CHOOSE_NEON(FUNC_NAME) nullptr + #endif + ++#if HWY_TARGETS & HWY_SVE ++#define HWY_CHOOSE_SVE(FUNC_NAME) &N_SVE::FUNC_NAME ++#else ++#define HWY_CHOOSE_SVE(FUNC_NAME) nullptr ++#endif ++ ++#if HWY_TARGETS & HWY_SVE2 ++#define HWY_CHOOSE_SVE2(FUNC_NAME) &N_SVE2::FUNC_NAME ++#else ++#define HWY_CHOOSE_SVE2(FUNC_NAME) nullptr ++#endif ++ + #if HWY_TARGETS & HWY_PPC8 + #define HWY_CHOOSE_PCC8(FUNC_NAME) &N_PPC8::FUNC_NAME + #else +@@ -261,8 +277,11 @@ FunctionCache Function + #elif HWY_TARGET == HWY_AVX3 + #include "hwy/ops/x86_512-inl.h" + #elif HWY_TARGET == HWY_PPC8 ++#error "PPC is not yet supported" + #elif HWY_TARGET == HWY_NEON + #include "hwy/ops/arm_neon-inl.h" ++#elif HWY_TARGET == HWY_SVE || HWY_TARGET == HWY_SVE2 ++#include "hwy/ops/arm_sve-inl.h" + #elif HWY_TARGET == HWY_WASM + #include "hwy/ops/wasm_128-inl.h" + #elif HWY_TARGET == HWY_RVV +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/nanobenchmark.cc.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/nanobenchmark.cc +--- chromium-92.0.4515.107/third_party/highway/src/hwy/nanobenchmark.cc.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/nanobenchmark.cc 2021-07-26 17:17:12.094291603 -0400 +@@ -29,6 +29,22 @@ + #include + #include + ++#if defined(_WIN32) || defined(_WIN64) ++#ifndef NOMINMAX ++#define NOMINMAX ++#endif // NOMINMAX ++#include ++#endif ++ ++#if defined(__MACH__) ++#include ++#include ++#endif ++ ++#if defined(__HAIKU__) ++#include ++#endif ++ + #include "hwy/base.h" + #if HWY_ARCH_PPC + #include // NOLINT __ppc_get_timebase_freq +@@ -43,114 +59,13 @@ + #endif // HWY_ARCH_X86 + + namespace hwy { +-namespace platform { + namespace { +- +-#if HWY_ARCH_X86 +- +-void Cpuid(const uint32_t level, const uint32_t count, +- uint32_t* HWY_RESTRICT abcd) { +-#if HWY_COMPILER_MSVC +- int regs[4]; +- __cpuidex(regs, level, count); +- for (int i = 0; i < 4; ++i) { +- abcd[i] = regs[i]; +- } +-#else +- uint32_t a; +- uint32_t b; +- uint32_t c; +- uint32_t d; +- __cpuid_count(level, count, a, b, c, d); +- abcd[0] = a; +- abcd[1] = b; +- abcd[2] = c; +- abcd[3] = d; +-#endif +-} +- +-std::string BrandString() { +- char brand_string[49]; +- std::array abcd; +- +- // Check if brand string is supported (it is on all reasonable Intel/AMD) +- Cpuid(0x80000000U, 0, abcd.data()); +- if (abcd[0] < 0x80000004U) { +- return std::string(); +- } +- +- for (size_t i = 0; i < 3; ++i) { +- Cpuid(static_cast(0x80000002U + i), 0, abcd.data()); +- memcpy(brand_string + i * 16, abcd.data(), sizeof(abcd)); +- } +- brand_string[48] = 0; +- return brand_string; +-} +- +-// Returns the frequency quoted inside the brand string. This does not +-// account for throttling nor Turbo Boost. +-double NominalClockRate() { +- const std::string& brand_string = BrandString(); +- // Brand strings include the maximum configured frequency. These prefixes are +- // defined by Intel CPUID documentation. +- const char* prefixes[3] = {"MHz", "GHz", "THz"}; +- const double multipliers[3] = {1E6, 1E9, 1E12}; +- for (size_t i = 0; i < 3; ++i) { +- const size_t pos_prefix = brand_string.find(prefixes[i]); +- if (pos_prefix != std::string::npos) { +- const size_t pos_space = brand_string.rfind(' ', pos_prefix - 1); +- if (pos_space != std::string::npos) { +- const std::string digits = +- brand_string.substr(pos_space + 1, pos_prefix - pos_space - 1); +- return std::stod(digits) * multipliers[i]; +- } +- } +- } +- +- return 0.0; +-} +- +-#endif // HWY_ARCH_X86 +- +-} // namespace +- +-// Returns tick rate. Invariant means the tick counter frequency is independent +-// of CPU throttling or sleep. May be expensive, caller should cache the result. +-double InvariantTicksPerSecond() { +-#if HWY_ARCH_PPC +- return __ppc_get_timebase_freq(); +-#elif HWY_ARCH_X86 +- // We assume the TSC is invariant; it is on all recent Intel/AMD CPUs. +- return NominalClockRate(); +-#else +- // Fall back to clock_gettime nanoseconds. +- return 1E9; +-#endif +-} +- +-} // namespace platform +-namespace { +- +-// Prevents the compiler from eliding the computations that led to "output". +-template +-inline void PreventElision(T&& output) { +-#if HWY_COMPILER_MSVC == 0 +- // Works by indicating to the compiler that "output" is being read and +- // modified. The +r constraint avoids unnecessary writes to memory, but only +- // works for built-in types (typically FuncOutput). +- asm volatile("" : "+r"(output) : : "memory"); +-#else +- // MSVC does not support inline assembly anymore (and never supported GCC's +- // RTL constraints). Self-assignment with #pragma optimize("off") might be +- // expected to prevent elision, but it does not with MSVC 2015. Type-punning +- // with volatile pointers generates inefficient code on MSVC 2017. +- static std::atomic dummy(T{}); +- dummy.store(output, std::memory_order_relaxed); +-#endif +-} +- + namespace timer { + ++// Ticks := platform-specific timer values (CPU cycles on x86). Must be ++// unsigned to guarantee wraparound on overflow. ++using Ticks = uint64_t; ++ + // Start/Stop return absolute timestamps and must be placed immediately before + // and after the region to measure. We provide separate Start/Stop functions + // because they use different fences. +@@ -202,8 +117,8 @@ namespace timer { + + // Returns a 64-bit timestamp in unit of 'ticks'; to convert to seconds, + // divide by InvariantTicksPerSecond. +-inline uint64_t Start64() { +- uint64_t t; ++inline Ticks Start() { ++ Ticks t; + #if HWY_ARCH_PPC + asm volatile("mfspr %0, %1" : "=r"(t) : "i"(268)); + #elif HWY_ARCH_X86 && HWY_COMPILER_MSVC +@@ -228,8 +143,15 @@ inline uint64_t Start64() { + : "rdx", "memory", "cc"); + #elif HWY_ARCH_RVV + asm volatile("rdcycle %0" : "=r"(t)); +-#else +- // Fall back to OS - unsure how to reliably query cntvct_el0 frequency. ++#elif defined(_WIN32) || defined(_WIN64) ++ LARGE_INTEGER counter; ++ (void)QueryPerformanceCounter(&counter); ++ t = counter.QuadPart; ++#elif defined(__MACH__) ++ t = mach_absolute_time(); ++#elif defined(__HAIKU__) ++ t = system_time_nsecs(); // since boot ++#else // POSIX + timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + t = ts.tv_sec * 1000000000LL + ts.tv_nsec; +@@ -237,7 +159,7 @@ inline uint64_t Start64() { + return t; + } + +-inline uint64_t Stop64() { ++inline Ticks Stop() { + uint64_t t; + #if HWY_ARCH_PPC + asm volatile("mfspr %0, %1" : "=r"(t) : "i"(268)); +@@ -261,61 +183,7 @@ inline uint64_t Stop64() { + // "cc" = flags modified by SHL. + : "rcx", "rdx", "memory", "cc"); + #else +- t = Start64(); +-#endif +- return t; +-} +- +-// Returns a 32-bit timestamp with about 4 cycles less overhead than +-// Start64. Only suitable for measuring very short regions because the +-// timestamp overflows about once a second. +-inline uint32_t Start32() { +- uint32_t t; +-#if HWY_ARCH_X86 && HWY_COMPILER_MSVC +- _ReadWriteBarrier(); +- _mm_lfence(); +- _ReadWriteBarrier(); +- t = static_cast(__rdtsc()); +- _ReadWriteBarrier(); +- _mm_lfence(); +- _ReadWriteBarrier(); +-#elif HWY_ARCH_X86_64 +- asm volatile( +- "lfence\n\t" +- "rdtsc\n\t" +- "lfence" +- : "=a"(t) +- : +- // "memory" avoids reordering. rdx = TSC >> 32. +- : "rdx", "memory"); +-#elif HWY_ARCH_RVV +- asm volatile("rdcycle %0" : "=r"(t)); +-#else +- t = static_cast(Start64()); +-#endif +- return t; +-} +- +-inline uint32_t Stop32() { +- uint32_t t; +-#if HWY_ARCH_X86 && HWY_COMPILER_MSVC +- _ReadWriteBarrier(); +- unsigned aux; +- t = static_cast(__rdtscp(&aux)); +- _ReadWriteBarrier(); +- _mm_lfence(); +- _ReadWriteBarrier(); +-#elif HWY_ARCH_X86_64 +- // Use inline asm because __rdtscp generates code to store TSC_AUX (ecx). +- asm volatile( +- "rdtscp\n\t" +- "lfence" +- : "=a"(t) +- : +- // "memory" avoids reordering. rcx = TSC_AUX. rdx = TSC >> 32. +- : "rcx", "rdx", "memory"); +-#else +- t = static_cast(Stop64()); ++ t = Start(); + #endif + return t; + } +@@ -440,21 +308,130 @@ T MedianAbsoluteDeviation(const T* value + } + + } // namespace robust_statistics ++} // namespace ++namespace platform { ++namespace { + +-// Ticks := platform-specific timer values (CPU cycles on x86). Must be +-// unsigned to guarantee wraparound on overflow. 32 bit timers are faster to +-// read than 64 bit. +-using Ticks = uint32_t; ++// Prevents the compiler from eliding the computations that led to "output". ++template ++inline void PreventElision(T&& output) { ++#if HWY_COMPILER_MSVC == 0 ++ // Works by indicating to the compiler that "output" is being read and ++ // modified. The +r constraint avoids unnecessary writes to memory, but only ++ // works for built-in types (typically FuncOutput). ++ asm volatile("" : "+r"(output) : : "memory"); ++#else ++ // MSVC does not support inline assembly anymore (and never supported GCC's ++ // RTL constraints). Self-assignment with #pragma optimize("off") might be ++ // expected to prevent elision, but it does not with MSVC 2015. Type-punning ++ // with volatile pointers generates inefficient code on MSVC 2017. ++ static std::atomic dummy(T{}); ++ dummy.store(output, std::memory_order_relaxed); ++#endif ++} ++ ++#if HWY_ARCH_X86 ++ ++void Cpuid(const uint32_t level, const uint32_t count, ++ uint32_t* HWY_RESTRICT abcd) { ++#if HWY_COMPILER_MSVC ++ int regs[4]; ++ __cpuidex(regs, level, count); ++ for (int i = 0; i < 4; ++i) { ++ abcd[i] = regs[i]; ++ } ++#else ++ uint32_t a; ++ uint32_t b; ++ uint32_t c; ++ uint32_t d; ++ __cpuid_count(level, count, a, b, c, d); ++ abcd[0] = a; ++ abcd[1] = b; ++ abcd[2] = c; ++ abcd[3] = d; ++#endif ++} ++ ++std::string BrandString() { ++ char brand_string[49]; ++ std::array abcd; ++ ++ // Check if brand string is supported (it is on all reasonable Intel/AMD) ++ Cpuid(0x80000000U, 0, abcd.data()); ++ if (abcd[0] < 0x80000004U) { ++ return std::string(); ++ } ++ ++ for (size_t i = 0; i < 3; ++i) { ++ Cpuid(static_cast(0x80000002U + i), 0, abcd.data()); ++ memcpy(brand_string + i * 16, abcd.data(), sizeof(abcd)); ++ } ++ brand_string[48] = 0; ++ return brand_string; ++} ++ ++// Returns the frequency quoted inside the brand string. This does not ++// account for throttling nor Turbo Boost. ++double NominalClockRate() { ++ const std::string& brand_string = BrandString(); ++ // Brand strings include the maximum configured frequency. These prefixes are ++ // defined by Intel CPUID documentation. ++ const char* prefixes[3] = {"MHz", "GHz", "THz"}; ++ const double multipliers[3] = {1E6, 1E9, 1E12}; ++ for (size_t i = 0; i < 3; ++i) { ++ const size_t pos_prefix = brand_string.find(prefixes[i]); ++ if (pos_prefix != std::string::npos) { ++ const size_t pos_space = brand_string.rfind(' ', pos_prefix - 1); ++ if (pos_space != std::string::npos) { ++ const std::string digits = ++ brand_string.substr(pos_space + 1, pos_prefix - pos_space - 1); ++ return std::stod(digits) * multipliers[i]; ++ } ++ } ++ } ++ ++ return 0.0; ++} ++ ++#endif // HWY_ARCH_X86 ++ ++} // namespace ++ ++double InvariantTicksPerSecond() { ++#if HWY_ARCH_PPC ++ return __ppc_get_timebase_freq(); ++#elif HWY_ARCH_X86 ++ // We assume the TSC is invariant; it is on all recent Intel/AMD CPUs. ++ return NominalClockRate(); ++#elif defined(_WIN32) || defined(_WIN64) ++ LARGE_INTEGER freq; ++ (void)QueryPerformanceFrequency(&freq); ++ return double(freq.QuadPart); ++#elif defined(__MACH__) ++ // https://developer.apple.com/library/mac/qa/qa1398/_index.html ++ mach_timebase_info_data_t timebase; ++ (void)mach_timebase_info(&timebase); ++ return double(timebase.denom) / timebase.numer * 1E9; ++#else ++ // TODO(janwas): ARM? Unclear how to reliably query cntvct_el0 frequency. ++ return 1E9; // Haiku and clock_gettime return nanoseconds. ++#endif ++} + +-// Returns timer overhead / minimum measurable difference. +-Ticks TimerResolution() { ++double Now() { ++ static const double mul = 1.0 / InvariantTicksPerSecond(); ++ return static_cast(timer::Start()) * mul; ++} ++ ++uint64_t TimerResolution() { + // Nested loop avoids exceeding stack/L1 capacity. +- Ticks repetitions[Params::kTimerSamples]; ++ timer::Ticks repetitions[Params::kTimerSamples]; + for (size_t rep = 0; rep < Params::kTimerSamples; ++rep) { +- Ticks samples[Params::kTimerSamples]; ++ timer::Ticks samples[Params::kTimerSamples]; + for (size_t i = 0; i < Params::kTimerSamples; ++i) { +- const Ticks t0 = timer::Start32(); +- const Ticks t1 = timer::Stop32(); ++ const timer::Ticks t0 = timer::Start(); ++ const timer::Ticks t1 = timer::Stop(); + samples[i] = t1 - t0; + } + repetitions[rep] = robust_statistics::Mode(samples); +@@ -462,18 +439,21 @@ Ticks TimerResolution() { + return robust_statistics::Mode(repetitions); + } + +-static const Ticks timer_resolution = TimerResolution(); ++} // namespace platform ++namespace { ++ ++static const timer::Ticks timer_resolution = platform::TimerResolution(); + + // Estimates the expected value of "lambda" values with a variable number of + // samples until the variability "rel_mad" is less than "max_rel_mad". + template +-Ticks SampleUntilStable(const double max_rel_mad, double* rel_mad, +- const Params& p, const Lambda& lambda) { ++timer::Ticks SampleUntilStable(const double max_rel_mad, double* rel_mad, ++ const Params& p, const Lambda& lambda) { + // Choose initial samples_per_eval based on a single estimated duration. +- Ticks t0 = timer::Start32(); ++ timer::Ticks t0 = timer::Start(); + lambda(); +- Ticks t1 = timer::Stop32(); +- Ticks est = t1 - t0; ++ timer::Ticks t1 = timer::Stop(); ++ timer::Ticks est = t1 - t0; + static const double ticks_per_second = platform::InvariantTicksPerSecond(); + const size_t ticks_per_eval = + static_cast(ticks_per_second * p.seconds_per_eval); +@@ -481,21 +461,21 @@ Ticks SampleUntilStable(const double max + est == 0 ? p.min_samples_per_eval : ticks_per_eval / est; + samples_per_eval = std::max(samples_per_eval, p.min_samples_per_eval); + +- std::vector samples; ++ std::vector samples; + samples.reserve(1 + samples_per_eval); + samples.push_back(est); + + // Percentage is too strict for tiny differences, so also allow a small + // absolute "median absolute deviation". +- const Ticks max_abs_mad = (timer_resolution + 99) / 100; ++ const timer::Ticks max_abs_mad = (timer_resolution + 99) / 100; + *rel_mad = 0.0; // ensure initialized + + for (size_t eval = 0; eval < p.max_evals; ++eval, samples_per_eval *= 2) { + samples.reserve(samples.size() + samples_per_eval); + for (size_t i = 0; i < samples_per_eval; ++i) { +- t0 = timer::Start32(); ++ t0 = timer::Start(); + lambda(); +- t1 = timer::Stop32(); ++ t1 = timer::Stop(); + samples.push_back(t1 - t0); + } + +@@ -508,14 +488,14 @@ Ticks SampleUntilStable(const double max + NANOBENCHMARK_CHECK(est != 0); + + // Median absolute deviation (mad) is a robust measure of 'variability'. +- const Ticks abs_mad = robust_statistics::MedianAbsoluteDeviation( ++ const timer::Ticks abs_mad = robust_statistics::MedianAbsoluteDeviation( + samples.data(), samples.size(), est); +- *rel_mad = static_cast(int(abs_mad)) / est; ++ *rel_mad = static_cast(abs_mad) / static_cast(est); + + if (*rel_mad <= max_rel_mad || abs_mad <= max_abs_mad) { + if (p.verbose) { +- printf("%6zu samples => %5u (abs_mad=%4u, rel_mad=%4.2f%%)\n", +- samples.size(), est, abs_mad, *rel_mad * 100.0); ++ printf("%6zu samples => %5zu (abs_mad=%4zu, rel_mad=%4.2f%%)\n", ++ samples.size(), size_t(est), size_t(abs_mad), *rel_mad * 100.0); + } + return est; + } +@@ -539,29 +519,17 @@ InputVec UniqueInputs(const FuncInput* i + return unique; + } + +-// Returns how often we need to call func for sufficient precision, or zero +-// on failure (e.g. the elapsed time is too long for a 32-bit tick count). ++// Returns how often we need to call func for sufficient precision. + size_t NumSkip(const Func func, const uint8_t* arg, const InputVec& unique, + const Params& p) { + // Min elapsed ticks for any input. +- Ticks min_duration = ~0u; ++ timer::Ticks min_duration = ~timer::Ticks(0); + + for (const FuncInput input : unique) { +- // Make sure a 32-bit timer is sufficient. +- const uint64_t t0 = timer::Start64(); +- PreventElision(func(arg, input)); +- const uint64_t t1 = timer::Stop64(); +- const uint64_t elapsed = t1 - t0; +- if (elapsed >= (1ULL << 30)) { +- fprintf(stderr, "Measurement failed: need 64-bit timer for input=%zu\n", +- input); +- return 0; +- } +- + double rel_mad; +- const Ticks total = SampleUntilStable( ++ const timer::Ticks total = SampleUntilStable( + p.target_rel_mad, &rel_mad, p, +- [func, arg, input]() { PreventElision(func(arg, input)); }); ++ [func, arg, input]() { platform::PreventElision(func(arg, input)); }); + min_duration = std::min(min_duration, total - timer_resolution); + } + +@@ -571,8 +539,8 @@ size_t NumSkip(const Func func, const ui + const size_t num_skip = + min_duration == 0 ? 0 : (max_skip + min_duration - 1) / min_duration; + if (p.verbose) { +- printf("res=%u max_skip=%zu min_dur=%u num_skip=%zu\n", timer_resolution, +- max_skip, min_duration, num_skip); ++ printf("res=%zu max_skip=%zu min_dur=%zu num_skip=%zu\n", ++ size_t(timer_resolution), max_skip, size_t(min_duration), num_skip); + } + return num_skip; + } +@@ -637,13 +605,14 @@ void FillSubset(const InputVec& full, co + } + + // Returns total ticks elapsed for all inputs. +-Ticks TotalDuration(const Func func, const uint8_t* arg, const InputVec* inputs, +- const Params& p, double* max_rel_mad) { ++timer::Ticks TotalDuration(const Func func, const uint8_t* arg, ++ const InputVec* inputs, const Params& p, ++ double* max_rel_mad) { + double rel_mad; +- const Ticks duration = ++ const timer::Ticks duration = + SampleUntilStable(p.target_rel_mad, &rel_mad, p, [func, arg, inputs]() { + for (const FuncInput input : *inputs) { +- PreventElision(func(arg, input)); ++ platform::PreventElision(func(arg, input)); + } + }); + *max_rel_mad = std::max(*max_rel_mad, rel_mad); +@@ -657,19 +626,20 @@ HWY_NOINLINE FuncOutput EmptyFunc(const + + // Returns overhead of accessing inputs[] and calling a function; this will + // be deducted from future TotalDuration return values. +-Ticks Overhead(const uint8_t* arg, const InputVec* inputs, const Params& p) { ++timer::Ticks Overhead(const uint8_t* arg, const InputVec* inputs, ++ const Params& p) { + double rel_mad; + // Zero tolerance because repeatability is crucial and EmptyFunc is fast. + return SampleUntilStable(0.0, &rel_mad, p, [arg, inputs]() { + for (const FuncInput input : *inputs) { +- PreventElision(EmptyFunc(arg, input)); ++ platform::PreventElision(EmptyFunc(arg, input)); + } + }); + } + + } // namespace + +-int Unpredictable1() { return timer::Start64() != ~0ULL; } ++int Unpredictable1() { return timer::Start() != ~0ULL; } + + size_t Measure(const Func func, const uint8_t* arg, const FuncInput* inputs, + const size_t num_inputs, Result* results, const Params& p) { +@@ -685,32 +655,35 @@ size_t Measure(const Func func, const ui + ReplicateInputs(inputs, num_inputs, unique.size(), num_skip, p); + InputVec subset(full.size() - num_skip); + +- const Ticks overhead = Overhead(arg, &full, p); +- const Ticks overhead_skip = Overhead(arg, &subset, p); ++ const timer::Ticks overhead = Overhead(arg, &full, p); ++ const timer::Ticks overhead_skip = Overhead(arg, &subset, p); + if (overhead < overhead_skip) { +- fprintf(stderr, "Measurement failed: overhead %u < %u\n", overhead, +- overhead_skip); ++ fprintf(stderr, "Measurement failed: overhead %zu < %zu\n", ++ size_t(overhead), size_t(overhead_skip)); + return 0; + } + + if (p.verbose) { +- printf("#inputs=%5zu,%5zu overhead=%5u,%5u\n", full.size(), subset.size(), +- overhead, overhead_skip); ++ printf("#inputs=%5zu,%5zu overhead=%5zu,%5zu\n", full.size(), subset.size(), ++ size_t(overhead), size_t(overhead_skip)); + } + + double max_rel_mad = 0.0; +- const Ticks total = TotalDuration(func, arg, &full, p, &max_rel_mad); ++ const timer::Ticks total = TotalDuration(func, arg, &full, p, &max_rel_mad); + + for (size_t i = 0; i < unique.size(); ++i) { + FillSubset(full, unique[i], num_skip, &subset); +- const Ticks total_skip = TotalDuration(func, arg, &subset, p, &max_rel_mad); ++ const timer::Ticks total_skip = ++ TotalDuration(func, arg, &subset, p, &max_rel_mad); + + if (total < total_skip) { +- fprintf(stderr, "Measurement failed: total %u < %u\n", total, total_skip); ++ fprintf(stderr, "Measurement failed: total %zu < %zu\n", size_t(total), ++ size_t(total_skip)); + return 0; + } + +- const Ticks duration = (total - overhead) - (total_skip - overhead_skip); ++ const timer::Ticks duration = ++ (total - overhead) - (total_skip - overhead_skip); + results[i].input = unique[i]; + results[i].ticks = static_cast(duration) * mul; + results[i].variability = static_cast(max_rel_mad); +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/nanobenchmark.h.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/nanobenchmark.h +--- chromium-92.0.4515.107/third_party/highway/src/hwy/nanobenchmark.h.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/nanobenchmark.h 2021-07-26 17:17:12.094291603 -0400 +@@ -44,11 +44,6 @@ + // central tendency of the measurement samples with the "half sample mode", + // which is more robust to outliers and skewed data than the mean or median. + +-// WARNING if included from multiple translation units compiled with distinct +-// flags: this header requires textual inclusion and a predefined NB_NAMESPACE +-// macro that is unique to the current compile flags. We must also avoid +-// standard library headers such as vector and functional that define functions. +- + #include + #include + +@@ -79,6 +74,16 @@ namespace platform { + // This call may be expensive, callers should cache the result. + double InvariantTicksPerSecond(); + ++// Returns current timestamp [in seconds] relative to an unspecified origin. ++// Features: monotonic (no negative elapsed time), steady (unaffected by system ++// time changes), high-resolution (on the order of microseconds). ++double Now(); ++ ++// Returns ticks elapsed in back to back timer calls, i.e. a function of the ++// timer resolution (minimum measurable difference) and overhead. ++// This call is expensive, callers should cache the result. ++uint64_t TimerResolution(); ++ + } // namespace platform + + // Returns 1, but without the compiler knowing what the value is. This prevents +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/nanobenchmark_test.cc.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/nanobenchmark_test.cc +--- chromium-92.0.4515.107/third_party/highway/src/hwy/nanobenchmark_test.cc.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/nanobenchmark_test.cc 2021-07-26 17:10:30.283171481 -0400 +@@ -15,11 +15,11 @@ + #include "hwy/nanobenchmark.h" + + #include +-#include // strtol +-#include // sleep + + #include + ++#include "hwy/tests/test_util-inl.h" ++ + namespace hwy { + namespace { + +@@ -31,6 +31,7 @@ FuncOutput Div(const void*, FuncInput in + + template + void MeasureDiv(const FuncInput (&inputs)[N]) { ++ printf("Measuring integer division (output on final two lines)\n"); + Result results[N]; + Params params; + params.max_evals = 4; // avoid test timeout +@@ -66,39 +67,14 @@ void MeasureRandom(const FuncInput (&inp + } + } + +-template +-void EnsureLongMeasurementFails(const FuncInput (&inputs)[N]) { +- printf("Expect a 'measurement failed' below:\n"); +- Result results[N]; +- +- const size_t num_results = Measure( +- [](const void*, const FuncInput input) -> FuncOutput { +- // Loop until the sleep succeeds (not interrupted by signal). We assume +- // >= 512 MHz, so 2 seconds will exceed the 1 << 30 tick safety limit. +- while (sleep(2) != 0) { +- } +- return input; +- }, +- nullptr, inputs, N, results); +- NANOBENCHMARK_CHECK(num_results == 0); +- (void)num_results; +-} +- +-void RunAll(const int argc, char** /*argv*/) { +- // unpredictable == 1 but the compiler doesn't know that. +- const int unpredictable = argc != 999; ++TEST(NanobenchmarkTest, RunAll) { ++ const int unpredictable = Unpredictable1(); // == 1, unknown to compiler. + static const FuncInput inputs[] = {static_cast(unpredictable) + 2, + static_cast(unpredictable + 9)}; + + MeasureDiv(inputs); + MeasureRandom(inputs); +- EnsureLongMeasurementFails(inputs); + } + + } // namespace + } // namespace hwy +- +-int main(int argc, char* argv[]) { +- hwy::RunAll(argc, argv); +- return 0; +-} +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/ops/arm_neon-inl.h.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/ops/arm_neon-inl.h +--- chromium-92.0.4515.107/third_party/highway/src/hwy/ops/arm_neon-inl.h.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/ops/arm_neon-inl.h 2021-07-26 17:20:19.294142914 -0400 +@@ -26,6 +26,8 @@ HWY_BEFORE_NAMESPACE(); + namespace hwy { + namespace HWY_NAMESPACE { + ++namespace detail { // for code folding and Raw128 ++ + // Macros used to define single and double function calls for multiple types + // for full and half vectors. These macros are undefined at the end of the file. + +@@ -437,12 +439,14 @@ struct Raw128 { + using type = int8x8_t; + }; + ++} // namespace detail ++ + template + using Full128 = Simd; + + template + class Vec128 { +- using Raw = typename Raw128::type; ++ using Raw = typename detail::Raw128::type; + + public: + HWY_INLINE Vec128() {} +@@ -480,7 +484,8 @@ class Vec128 { + // FF..FF or 0, also for floating-point - see README. + template + class Mask128 { +- using Raw = typename Raw128::type; ++ // ARM C Language Extensions return and expect unsigned type. ++ using Raw = typename detail::Raw128, N>::type; + + public: + HWY_INLINE Mask128() {} +@@ -664,15 +669,25 @@ template + HWY_INLINE Vec128 Undefined(Simd /*d*/) { + HWY_DIAGNOSTICS(push) + HWY_DIAGNOSTICS_OFF(disable : 4701, ignored "-Wuninitialized") +- typename Raw128::type a; ++ typename detail::Raw128::type a; + return Vec128(a); + HWY_DIAGNOSTICS(pop) + } + +-// ------------------------------ Extract lane ++// Returns a vector with lane i=[0, N) set to "first" + i. ++template ++Vec128 Iota(const Simd d, const T2 first) { ++ HWY_ALIGN T lanes[16 / sizeof(T)]; ++ for (size_t i = 0; i < 16 / sizeof(T); ++i) { ++ lanes[i] = static_cast(first + static_cast(i)); ++ } ++ return Load(d, lanes); ++} ++ ++// ------------------------------ GetLane + + HWY_INLINE uint8_t GetLane(const Vec128 v) { +- return vget_lane_u8(vget_low_u8(v.raw), 0); ++ return vgetq_lane_u8(v.raw, 0); + } + template + HWY_INLINE uint8_t GetLane(const Vec128 v) { +@@ -680,7 +695,7 @@ HWY_INLINE uint8_t GetLane(const Vec128< + } + + HWY_INLINE int8_t GetLane(const Vec128 v) { +- return vget_lane_s8(vget_low_s8(v.raw), 0); ++ return vgetq_lane_s8(v.raw, 0); + } + template + HWY_INLINE int8_t GetLane(const Vec128 v) { +@@ -688,7 +703,7 @@ HWY_INLINE int8_t GetLane(const Vec128 v) { +- return vget_lane_u16(vget_low_u16(v.raw), 0); ++ return vgetq_lane_u16(v.raw, 0); + } + template + HWY_INLINE uint16_t GetLane(const Vec128 v) { +@@ -696,7 +711,7 @@ HWY_INLINE uint16_t GetLane(const Vec128 + } + + HWY_INLINE int16_t GetLane(const Vec128 v) { +- return vget_lane_s16(vget_low_s16(v.raw), 0); ++ return vgetq_lane_s16(v.raw, 0); + } + template + HWY_INLINE int16_t GetLane(const Vec128 v) { +@@ -704,7 +719,7 @@ HWY_INLINE int16_t GetLane(const Vec128< + } + + HWY_INLINE uint32_t GetLane(const Vec128 v) { +- return vget_lane_u32(vget_low_u32(v.raw), 0); ++ return vgetq_lane_u32(v.raw, 0); + } + template + HWY_INLINE uint32_t GetLane(const Vec128 v) { +@@ -712,7 +727,7 @@ HWY_INLINE uint32_t GetLane(const Vec128 + } + + HWY_INLINE int32_t GetLane(const Vec128 v) { +- return vget_lane_s32(vget_low_s32(v.raw), 0); ++ return vgetq_lane_s32(v.raw, 0); + } + template + HWY_INLINE int32_t GetLane(const Vec128 v) { +@@ -720,20 +735,20 @@ HWY_INLINE int32_t GetLane(const Vec128< + } + + HWY_INLINE uint64_t GetLane(const Vec128 v) { +- return vget_lane_u64(vget_low_u64(v.raw), 0); ++ return vgetq_lane_u64(v.raw, 0); + } + HWY_INLINE uint64_t GetLane(const Vec128 v) { + return vget_lane_u64(v.raw, 0); + } + HWY_INLINE int64_t GetLane(const Vec128 v) { +- return vget_lane_s64(vget_low_s64(v.raw), 0); ++ return vgetq_lane_s64(v.raw, 0); + } + HWY_INLINE int64_t GetLane(const Vec128 v) { + return vget_lane_s64(v.raw, 0); + } + + HWY_INLINE float GetLane(const Vec128 v) { +- return vget_lane_f32(vget_low_f32(v.raw), 0); ++ return vgetq_lane_f32(v.raw, 0); + } + HWY_INLINE float GetLane(const Vec128 v) { + return vget_lane_f32(v.raw, 0); +@@ -743,7 +758,7 @@ HWY_INLINE float GetLane(const Vec128 v) { +- return vget_lane_f64(vget_low_f64(v.raw), 0); ++ return vgetq_lane_f64(v.raw, 0); + } + HWY_INLINE double GetLane(const Vec128 v) { + return vget_lane_f64(v.raw, 0); +@@ -785,8 +800,6 @@ HWY_NEON_DEF_FUNCTION_INT_64(SaturatedSu + // ------------------------------ Average + + // Returns (a + b + 1) / 2 +- +-// Unsigned + HWY_NEON_DEF_FUNCTION_UINT_8(AverageRound, vrhadd, _, 2) + HWY_NEON_DEF_FUNCTION_UINT_16(AverageRound, vrhadd, _, 2) + +@@ -802,6 +815,7 @@ HWY_INLINE Vec128 Abs(const Vec + HWY_INLINE Vec128 Abs(const Vec128 v) { + return Vec128(vabsq_s32(v.raw)); + } ++// i64 is implemented after BroadcastSignBit. + HWY_INLINE Vec128 Abs(const Vec128 v) { + return Vec128(vabsq_f32(v.raw)); + } +@@ -1184,21 +1198,34 @@ HWY_INLINE Vec128 ApproximateR + #if HWY_ARCH_ARM_A64 + HWY_NEON_DEF_FUNCTION_ALL_FLOATS(operator/, vdiv, _, 2) + #else +-// Emulated with approx reciprocal + Newton-Raphson + mul ++// Not defined on armv7: approximate ++namespace detail { ++ ++HWY_INLINE Vec128 ReciprocalNewtonRaphsonStep( ++ const Vec128 recip, const Vec128 divisor) { ++ return Vec128(vrecpsq_f32(recip.raw, divisor.raw)); ++} ++template ++HWY_INLINE Vec128 ReciprocalNewtonRaphsonStep( ++ const Vec128 recip, Vec128 divisor) { ++ return Vec128(vrecps_f32(recip.raw, divisor.raw)); ++} ++ ++} // namespace detail ++ + template + HWY_INLINE Vec128 operator/(const Vec128 a, + const Vec128 b) { + auto x = ApproximateReciprocal(b); +- // Newton-Raphson on 1/x - b +- const auto two = Set(Simd(), 2); +- x = x * (two - b * x); +- x = x * (two - b * x); +- x = x * (two - b * x); ++ x *= detail::ReciprocalNewtonRaphsonStep(x, b); ++ x *= detail::ReciprocalNewtonRaphsonStep(x, b); ++ x *= detail::ReciprocalNewtonRaphsonStep(x, b); + return a * x; + } + #endif + +-// Absolute value of difference. ++// ------------------------------ Absolute value of difference. ++ + HWY_INLINE Vec128 AbsDiff(const Vec128 a, const Vec128 b) { + return Vec128(vabdq_f32(a.raw, b.raw)); + } +@@ -1312,7 +1339,7 @@ HWY_INLINE Vec128 NegMulSub(c + } + #endif + +-// ------------------------------ Floating-point square root ++// ------------------------------ Floating-point square root (IfThenZeroElse) + + // Approximate reciprocal square root + HWY_INLINE Vec128 ApproximateReciprocalSqrt(const Vec128 v) { +@@ -1328,77 +1355,33 @@ HWY_INLINE Vec128 ApproximateR + #if HWY_ARCH_ARM_A64 + HWY_NEON_DEF_FUNCTION_ALL_FLOATS(Sqrt, vsqrt, _, 1) + #else +-// Not defined on armv7: emulate with approx reciprocal sqrt + Goldschmidt. +-template +-HWY_INLINE Vec128 Sqrt(const Vec128 v) { +- auto b = v; +- auto Y = ApproximateReciprocalSqrt(v); +- auto x = v * Y; +- const auto half = Set(Simd(), 0.5); +- const auto oneandhalf = Set(Simd(), 1.5); +- for (size_t i = 0; i < 3; i++) { +- b = b * Y * Y; +- Y = oneandhalf - half * b; +- x = x * Y; +- } +- return IfThenZeroElse(v == Zero(Simd()), x); +-} +-#endif +- +-// ================================================== COMPARE +- +-// Comparisons fill a lane with 1-bits if the condition is true, else 0. ++namespace detail { + +-template +-HWY_API Mask128 RebindMask(Simd /*tag*/, Mask128 m) { +- static_assert(sizeof(TFrom) == sizeof(TTo), "Must have same size"); +- return Mask128{m.raw}; ++HWY_INLINE Vec128 ReciprocalSqrtStep(const Vec128 root, ++ const Vec128 recip) { ++ return Vec128(vrsqrtsq_f32(root.raw, recip.raw)); ++} ++template ++HWY_INLINE Vec128 ReciprocalSqrtStep(const Vec128 root, ++ Vec128 recip) { ++ return Vec128(vrsqrts_f32(root.raw, recip.raw)); + } + +-#define HWY_NEON_BUILD_TPL_HWY_COMPARE +-#define HWY_NEON_BUILD_RET_HWY_COMPARE(type, size) Mask128 +-#define HWY_NEON_BUILD_PARAM_HWY_COMPARE(type, size) \ +- const Vec128 a, const Vec128 b +-#define HWY_NEON_BUILD_ARG_HWY_COMPARE a.raw, b.raw +- +-// ------------------------------ Equality +-HWY_NEON_DEF_FUNCTION_ALL_FLOATS(operator==, vceq, _, HWY_COMPARE) +-#if HWY_ARCH_ARM_A64 +-HWY_NEON_DEF_FUNCTION_INTS_UINTS(operator==, vceq, _, HWY_COMPARE) +-#else +-// No 64-bit comparisons on armv7: emulate them below, after Shuffle2301. +-HWY_NEON_DEF_FUNCTION_INT_8_16_32(operator==, vceq, _, HWY_COMPARE) +-HWY_NEON_DEF_FUNCTION_UINT_8_16_32(operator==, vceq, _, HWY_COMPARE) +-#endif ++} // namespace detail + +-// ------------------------------ Strict inequality ++// Not defined on armv7: approximate ++template ++HWY_INLINE Vec128 Sqrt(const Vec128 v) { ++ auto recip = ApproximateReciprocalSqrt(v); + +-// Signed/float < (no unsigned) +-#if HWY_ARCH_ARM_A64 +-HWY_NEON_DEF_FUNCTION_INTS(operator<, vclt, _, HWY_COMPARE) +-#else +-HWY_NEON_DEF_FUNCTION_INT_8_16_32(operator<, vclt, _, HWY_COMPARE) +-#endif +-HWY_NEON_DEF_FUNCTION_ALL_FLOATS(operator<, vclt, _, HWY_COMPARE) ++ recip *= detail::ReciprocalSqrtStep(v * recip, recip); ++ recip *= detail::ReciprocalSqrtStep(v * recip, recip); ++ recip *= detail::ReciprocalSqrtStep(v * recip, recip); + +-// Signed/float > (no unsigned) +-#if HWY_ARCH_ARM_A64 +-HWY_NEON_DEF_FUNCTION_INTS(operator>, vcgt, _, HWY_COMPARE) +-#else +-HWY_NEON_DEF_FUNCTION_INT_8_16_32(operator>, vcgt, _, HWY_COMPARE) ++ const auto root = v * recip; ++ return IfThenZeroElse(v == Zero(Simd()), root); ++} + #endif +-HWY_NEON_DEF_FUNCTION_ALL_FLOATS(operator>, vcgt, _, HWY_COMPARE) +- +-// ------------------------------ Weak inequality +- +-// Float <= >= +-HWY_NEON_DEF_FUNCTION_ALL_FLOATS(operator<=, vcle, _, HWY_COMPARE) +-HWY_NEON_DEF_FUNCTION_ALL_FLOATS(operator>=, vcge, _, HWY_COMPARE) +- +-#undef HWY_NEON_BUILD_TPL_HWY_COMPARE +-#undef HWY_NEON_BUILD_RET_HWY_COMPARE +-#undef HWY_NEON_BUILD_PARAM_HWY_COMPARE +-#undef HWY_NEON_BUILD_ARG_HWY_COMPARE + + // ================================================== LOGICAL + +@@ -1407,13 +1390,16 @@ HWY_NEON_DEF_FUNCTION_ALL_FLOATS(operato + // There is no 64-bit vmvn, so cast instead of using HWY_NEON_DEF_FUNCTION. + template + HWY_INLINE Vec128 Not(const Vec128 v) { +- const Full128 d8; +- return Vec128(vmvnq_u8(BitCast(d8, v).raw)); ++ const Full128 d; ++ const Repartition d8; ++ return BitCast(d, Vec128(vmvnq_u8(BitCast(d8, v).raw))); + } + template + HWY_INLINE Vec128 Not(const Vec128 v) { +- const Repartition> d8; +- return Vec128(vmvn_u8(BitCast(d8, v).raw)); ++ const Simd d; ++ const Repartition d8; ++ using V8 = decltype(Zero(d8)); ++ return BitCast(d, V8(vmvn_u8(BitCast(d8, v).raw))); + } + + // ------------------------------ And +@@ -1513,33 +1499,38 @@ HWY_API Vec128 BroadcastSignBit(co + return ShiftRight(v); + } + +-// ------------------------------ Make mask ++// ================================================== MASK + +-template +-HWY_INLINE Mask128 TestBit(Vec128 v, Vec128 bit) { +- static_assert(!hwy::IsFloat(), "Only integer vectors supported"); +- return (v & bit) == bit; +-} ++// ------------------------------ To/from vector + +-// Mask and Vec are the same (true = FF..FF). ++// Mask and Vec have the same representation (true = FF..FF). + template + HWY_INLINE Mask128 MaskFromVec(const Vec128 v) { +- return Mask128(v.raw); ++ const Simd, N> du; ++ return Mask128(BitCast(du, v).raw); + } + ++// DEPRECATED + template + HWY_INLINE Vec128 VecFromMask(const Mask128 v) { +- return Vec128(v.raw); ++ return BitCast(Simd(), Vec128, N>(v.raw)); + } + + template +-HWY_INLINE Vec128 VecFromMask(Simd /* tag */, +- const Mask128 v) { +- return Vec128(v.raw); ++HWY_INLINE Vec128 VecFromMask(Simd d, const Mask128 v) { ++ return BitCast(d, Vec128, N>(v.raw)); ++} ++ ++// ------------------------------ RebindMask ++ ++template ++HWY_API Mask128 RebindMask(Simd dto, Mask128 m) { ++ static_assert(sizeof(TFrom) == sizeof(TTo), "Must have same size"); ++ return MaskFromVec(BitCast(dto, VecFromMask(Simd(), m))); + } + +-// IfThenElse(mask, yes, no) +-// Returns mask ? b : a. ++// ------------------------------ IfThenElse(mask, yes, no) = mask ? b : a. ++ + #define HWY_NEON_BUILD_TPL_HWY_IF + #define HWY_NEON_BUILD_RET_HWY_IF(type, size) Vec128 + #define HWY_NEON_BUILD_PARAM_HWY_IF(type, size) \ +@@ -1574,7 +1565,6 @@ HWY_INLINE Vec128 ZeroIfNegative(V + return Max(zero, v); + } + +- + // ------------------------------ Mask logical + + template +@@ -1607,30 +1597,183 @@ HWY_API Mask128 Xor(const Mask128< + return MaskFromVec(Xor(VecFromMask(d, a), VecFromMask(d, b))); + } + +-// ------------------------------ Min (IfThenElse, BroadcastSignBit) ++// ================================================== COMPARE + +-namespace detail { ++// Comparisons fill a lane with 1-bits if the condition is true, else 0. ++ ++// ------------------------------ Shuffle2301 (for i64 compares) ++ ++// Swap 32-bit halves in 64-bits ++HWY_INLINE Vec128 Shuffle2301(const Vec128 v) { ++ return Vec128(vrev64_u32(v.raw)); ++} ++HWY_INLINE Vec128 Shuffle2301(const Vec128 v) { ++ return Vec128(vrev64_s32(v.raw)); ++} ++HWY_INLINE Vec128 Shuffle2301(const Vec128 v) { ++ return Vec128(vrev64_f32(v.raw)); ++} ++HWY_INLINE Vec128 Shuffle2301(const Vec128 v) { ++ return Vec128(vrev64q_u32(v.raw)); ++} ++HWY_INLINE Vec128 Shuffle2301(const Vec128 v) { ++ return Vec128(vrev64q_s32(v.raw)); ++} ++HWY_INLINE Vec128 Shuffle2301(const Vec128 v) { ++ return Vec128(vrev64q_f32(v.raw)); ++} ++ ++#define HWY_NEON_BUILD_TPL_HWY_COMPARE ++#define HWY_NEON_BUILD_RET_HWY_COMPARE(type, size) Mask128 ++#define HWY_NEON_BUILD_PARAM_HWY_COMPARE(type, size) \ ++ const Vec128 a, const Vec128 b ++#define HWY_NEON_BUILD_ARG_HWY_COMPARE a.raw, b.raw + ++// ------------------------------ Equality ++HWY_NEON_DEF_FUNCTION_ALL_FLOATS(operator==, vceq, _, HWY_COMPARE) + #if HWY_ARCH_ARM_A64 ++HWY_NEON_DEF_FUNCTION_INTS_UINTS(operator==, vceq, _, HWY_COMPARE) ++#else ++// No 64-bit comparisons on armv7: emulate them below, after Shuffle2301. ++HWY_NEON_DEF_FUNCTION_INT_8_16_32(operator==, vceq, _, HWY_COMPARE) ++HWY_NEON_DEF_FUNCTION_UINT_8_16_32(operator==, vceq, _, HWY_COMPARE) ++#endif + +-HWY_INLINE Vec128 Gt(Vec128 a, Vec128 b) { +- return Vec128(vcgtq_u64(a.raw, b.raw)); ++// ------------------------------ Strict inequality (signed, float) ++#if HWY_ARCH_ARM_A64 ++HWY_NEON_DEF_FUNCTION_INTS(operator<, vclt, _, HWY_COMPARE) ++#else ++HWY_NEON_DEF_FUNCTION_INT_8_16_32(operator<, vclt, _, HWY_COMPARE) ++#endif ++HWY_NEON_DEF_FUNCTION_ALL_FLOATS(operator<, vclt, _, HWY_COMPARE) ++ ++// ------------------------------ Weak inequality (float) ++HWY_NEON_DEF_FUNCTION_ALL_FLOATS(operator<=, vcle, _, HWY_COMPARE) ++ ++#undef HWY_NEON_BUILD_TPL_HWY_COMPARE ++#undef HWY_NEON_BUILD_RET_HWY_COMPARE ++#undef HWY_NEON_BUILD_PARAM_HWY_COMPARE ++#undef HWY_NEON_BUILD_ARG_HWY_COMPARE ++ ++// ------------------------------ ARMv7 i64 compare (Shuffle2301, Eq) ++ ++#if HWY_ARCH_ARM_V7 ++ ++template ++HWY_INLINE Mask128 operator==(const Vec128 a, ++ const Vec128 b) { ++ const Simd d32; ++ const Simd d64; ++ const auto cmp32 = VecFromMask(d32, Eq(BitCast(d32, a), BitCast(d32, b))); ++ const auto cmp64 = cmp32 & Shuffle2301(cmp32); ++ return MaskFromVec(BitCast(d64, cmp64)); + } +-HWY_INLINE Vec128 Gt(Vec128 a, +- Vec128 b) { +- return Vec128(vcgt_u64(a.raw, b.raw)); ++ ++template ++HWY_INLINE Mask128 operator==(const Vec128 a, ++ const Vec128 b) { ++ const Simd d32; ++ const Simd d64; ++ const auto cmp32 = VecFromMask(d32, Eq(BitCast(d32, a), BitCast(d32, b))); ++ const auto cmp64 = cmp32 & Shuffle2301(cmp32); ++ return MaskFromVec(BitCast(d64, cmp64)); + } + +-HWY_INLINE Vec128 Gt(Vec128 a, Vec128 b) { +- return Vec128(vcgtq_s64(a.raw, b.raw)); ++HWY_INLINE Mask128 operator<(const Vec128 a, ++ const Vec128 b) { ++ const int64x2_t sub = vqsubq_s64(a.raw, b.raw); ++ return MaskFromVec(BroadcastSignBit(Vec128(sub))); + } +-HWY_INLINE Vec128 Gt(Vec128 a, Vec128 b) { +- return Vec128(vcgt_s64(a.raw, b.raw)); ++HWY_INLINE Mask128 operator<(const Vec128 a, ++ const Vec128 b) { ++ const int64x1_t sub = vqsub_s64(a.raw, b.raw); ++ return MaskFromVec(BroadcastSignBit(Vec128(sub))); + } + + #endif + +-} // namespace detail ++// ------------------------------ Reversed comparisons ++ ++template ++HWY_API Mask128 operator>(Vec128 a, Vec128 b) { ++ return operator<(b, a); ++} ++template ++HWY_API Mask128 operator>=(Vec128 a, Vec128 b) { ++ return operator<=(b, a); ++} ++ ++// ------------------------------ FirstN (Iota, Lt) ++ ++template ++HWY_API Mask128 FirstN(const Simd d, size_t num) { ++ const RebindToSigned di; // Signed comparisons are cheaper. ++ return RebindMask(d, Iota(di, 0) < Set(di, static_cast>(num))); ++} ++ ++// ------------------------------ TestBit (Eq) ++ ++#define HWY_NEON_BUILD_TPL_HWY_TESTBIT ++#define HWY_NEON_BUILD_RET_HWY_TESTBIT(type, size) Mask128 ++#define HWY_NEON_BUILD_PARAM_HWY_TESTBIT(type, size) \ ++ Vec128 v, Vec128 bit ++#define HWY_NEON_BUILD_ARG_HWY_TESTBIT v.raw, bit.raw ++ ++#if HWY_ARCH_ARM_A64 ++HWY_NEON_DEF_FUNCTION_INTS_UINTS(TestBit, vtst, _, HWY_TESTBIT) ++#else ++// No 64-bit versions on armv7 ++HWY_NEON_DEF_FUNCTION_UINT_8_16_32(TestBit, vtst, _, HWY_TESTBIT) ++HWY_NEON_DEF_FUNCTION_INT_8_16_32(TestBit, vtst, _, HWY_TESTBIT) ++ ++template ++HWY_INLINE Mask128 TestBit(Vec128 v, ++ Vec128 bit) { ++ return (v & bit) == bit; ++} ++template ++HWY_INLINE Mask128 TestBit(Vec128 v, ++ Vec128 bit) { ++ return (v & bit) == bit; ++} ++ ++#endif ++#undef HWY_NEON_BUILD_TPL_HWY_TESTBIT ++#undef HWY_NEON_BUILD_RET_HWY_TESTBIT ++#undef HWY_NEON_BUILD_PARAM_HWY_TESTBIT ++#undef HWY_NEON_BUILD_ARG_HWY_TESTBIT ++ ++// ------------------------------ Abs i64 (IfThenElse, BroadcastSignBit) ++HWY_INLINE Vec128 Abs(const Vec128 v) { ++#if HWY_ARCH_ARM_A64 ++ return Vec128(vabsq_s64(v.raw)); ++#else ++ const auto zero = Zero(Full128()); ++ return IfThenElse(MaskFromVec(BroadcastSignBit(v)), zero - v, v); ++#endif ++} ++HWY_INLINE Vec128 Abs(const Vec128 v) { ++#if HWY_ARCH_ARM_A64 ++ return Vec128(vabs_s64(v.raw)); ++#else ++ const auto zero = Zero(Simd()); ++ return IfThenElse(MaskFromVec(BroadcastSignBit(v)), zero - v, v); ++#endif ++} ++ ++// ------------------------------ Min (IfThenElse, BroadcastSignBit) ++ ++#if HWY_ARCH_ARM_A64 ++ ++HWY_INLINE Mask128 operator<(Vec128 a, Vec128 b) { ++ return Mask128(vcltq_u64(a.raw, b.raw)); ++} ++HWY_INLINE Mask128 operator<(Vec128 a, ++ Vec128 b) { ++ return Mask128(vclt_u64(a.raw, b.raw)); ++} ++ ++#endif + + // Unsigned + HWY_NEON_DEF_FUNCTION_UINT_8_16_32(Min, vmin, _, 2) +@@ -1639,7 +1782,7 @@ template + HWY_INLINE Vec128 Min(const Vec128 a, + const Vec128 b) { + #if HWY_ARCH_ARM_A64 +- return IfThenElse(MaskFromVec(detail::Gt(a, b)), b, a); ++ return IfThenElse(b < a, b, a); + #else + const Simd du; + const Simd di; +@@ -1654,7 +1797,7 @@ template + HWY_INLINE Vec128 Min(const Vec128 a, + const Vec128 b) { + #if HWY_ARCH_ARM_A64 +- return IfThenElse(MaskFromVec(detail::Gt(a, b)), b, a); ++ return IfThenElse(b < a, b, a); + #else + const Vec128 sign = detail::SaturatedSub(a, b); + return IfThenElse(MaskFromVec(BroadcastSignBit(sign)), a, b); +@@ -1677,7 +1820,7 @@ template + HWY_INLINE Vec128 Max(const Vec128 a, + const Vec128 b) { + #if HWY_ARCH_ARM_A64 +- return IfThenElse(MaskFromVec(detail::Gt(a, b)), a, b); ++ return IfThenElse(b < a, a, b); + #else + const Simd du; + const Simd di; +@@ -1692,7 +1835,7 @@ template + HWY_INLINE Vec128 Max(const Vec128 a, + const Vec128 b) { + #if HWY_ARCH_ARM_A64 +- return IfThenElse(MaskFromVec(detail::Gt(a, b)), a, b); ++ return IfThenElse(b < a, a, b); + #else + const Vec128 sign = detail::SaturatedSub(a, b); + return IfThenElse(MaskFromVec(BroadcastSignBit(sign)), b, a); +@@ -1805,73 +1948,72 @@ HWY_INLINE Vec128 LoadU(Simd< + // we don't actually care what is in it, and we don't want + // to introduce extra overhead by initializing it to something. + +-HWY_INLINE Vec128 LoadU(Simd d, ++HWY_INLINE Vec128 LoadU(Simd /*tag*/, + const uint8_t* HWY_RESTRICT p) { +- uint32x2_t a = Undefined(d).raw; ++ uint32x2_t a = Undefined(Simd()).raw; + uint32x2_t b = vld1_lane_u32(reinterpret_cast(p), a, 0); + return Vec128(vreinterpret_u8_u32(b)); + } +-HWY_INLINE Vec128 LoadU(Simd d, ++HWY_INLINE Vec128 LoadU(Simd /*tag*/, + const uint16_t* HWY_RESTRICT p) { +- uint32x2_t a = Undefined(d).raw; ++ uint32x2_t a = Undefined(Simd()).raw; + uint32x2_t b = vld1_lane_u32(reinterpret_cast(p), a, 0); + return Vec128(vreinterpret_u16_u32(b)); + } +-HWY_INLINE Vec128 LoadU(Simd d, ++HWY_INLINE Vec128 LoadU(Simd /*tag*/, + const uint32_t* HWY_RESTRICT p) { +- uint32x2_t a = Undefined(d).raw; ++ uint32x2_t a = Undefined(Simd()).raw; + uint32x2_t b = vld1_lane_u32(p, a, 0); + return Vec128(b); + } +-HWY_INLINE Vec128 LoadU(Simd d, ++HWY_INLINE Vec128 LoadU(Simd /*tag*/, + const int8_t* HWY_RESTRICT p) { +- int32x2_t a = Undefined(d).raw; ++ int32x2_t a = Undefined(Simd()).raw; + int32x2_t b = vld1_lane_s32(reinterpret_cast(p), a, 0); + return Vec128(vreinterpret_s8_s32(b)); + } +-HWY_INLINE Vec128 LoadU(Simd d, ++HWY_INLINE Vec128 LoadU(Simd /*tag*/, + const int16_t* HWY_RESTRICT p) { +- int32x2_t a = Undefined(d).raw; ++ int32x2_t a = Undefined(Simd()).raw; + int32x2_t b = vld1_lane_s32(reinterpret_cast(p), a, 0); + return Vec128(vreinterpret_s16_s32(b)); + } +-HWY_INLINE Vec128 LoadU(Simd d, ++HWY_INLINE Vec128 LoadU(Simd /*tag*/, + const int32_t* HWY_RESTRICT p) { +- int32x2_t a = Undefined(d).raw; ++ int32x2_t a = Undefined(Simd()).raw; + int32x2_t b = vld1_lane_s32(p, a, 0); + return Vec128(b); + } +-HWY_INLINE Vec128 LoadU(Simd d, ++HWY_INLINE Vec128 LoadU(Simd /*tag*/, + const float* HWY_RESTRICT p) { +- float32x2_t a = Undefined(d).raw; ++ float32x2_t a = Undefined(Simd()).raw; + float32x2_t b = vld1_lane_f32(p, a, 0); + return Vec128(b); + } + + // ------------------------------ Load 16 + +-HWY_INLINE Vec128 LoadU(Simd d, ++HWY_INLINE Vec128 LoadU(Simd /*tag*/, + const uint8_t* HWY_RESTRICT p) { +- uint16x4_t a = Undefined(d).raw; ++ uint16x4_t a = Undefined(Simd()).raw; + uint16x4_t b = vld1_lane_u16(reinterpret_cast(p), a, 0); + return Vec128(vreinterpret_u8_u16(b)); + } +-HWY_INLINE Vec128 LoadU(Simd d, ++HWY_INLINE Vec128 LoadU(Simd /*tag*/, + const uint16_t* HWY_RESTRICT p) { +- uint16x4_t a = Undefined(d).raw; ++ uint16x4_t a = Undefined(Simd()).raw; + uint16x4_t b = vld1_lane_u16(p, a, 0); + return Vec128(b); + } +- +-HWY_INLINE Vec128 LoadU(Simd d, ++HWY_INLINE Vec128 LoadU(Simd /*tag*/, + const int8_t* HWY_RESTRICT p) { +- int16x4_t a = Undefined(d).raw; ++ int16x4_t a = Undefined(Simd()).raw; + int16x4_t b = vld1_lane_s16(reinterpret_cast(p), a, 0); + return Vec128(vreinterpret_s8_s16(b)); + } +-HWY_INLINE Vec128 LoadU(Simd d, ++HWY_INLINE Vec128 LoadU(Simd /*tag*/, + const int16_t* HWY_RESTRICT p) { +- int16x4_t a = Undefined(d).raw; ++ int16x4_t a = Undefined(Simd()).raw; + int16x4_t b = vld1_lane_s16(p, a, 0); + return Vec128(b); + } +@@ -2009,12 +2151,12 @@ HWY_INLINE void StoreU(const Vec128 v, Simd, + uint8_t* HWY_RESTRICT p) { + uint32x2_t a = vreinterpret_u32_u8(v.raw); +- vst1_lane_u32(p, a, 0); ++ vst1_lane_u32(reinterpret_cast(p), a, 0); + } + HWY_INLINE void StoreU(const Vec128 v, Simd, + uint16_t* HWY_RESTRICT p) { + uint32x2_t a = vreinterpret_u32_u16(v.raw); +- vst1_lane_u32(p, a, 0); ++ vst1_lane_u32(reinterpret_cast(p), a, 0); + } + HWY_INLINE void StoreU(const Vec128 v, Simd, + uint32_t* HWY_RESTRICT p) { +@@ -2023,12 +2165,12 @@ HWY_INLINE void StoreU(const Vec128 v, Simd, + int8_t* HWY_RESTRICT p) { + int32x2_t a = vreinterpret_s32_s8(v.raw); +- vst1_lane_s32(p, a, 0); ++ vst1_lane_s32(reinterpret_cast(p), a, 0); + } + HWY_INLINE void StoreU(const Vec128 v, Simd, + int16_t* HWY_RESTRICT p) { + int32x2_t a = vreinterpret_s32_s16(v.raw); +- vst1_lane_s32(p, a, 0); ++ vst1_lane_s32(reinterpret_cast(p), a, 0); + } + HWY_INLINE void StoreU(const Vec128 v, Simd, + int32_t* HWY_RESTRICT p) { +@@ -2044,7 +2186,7 @@ HWY_INLINE void StoreU(const Vec128 v, Simd, + uint8_t* HWY_RESTRICT p) { + uint16x4_t a = vreinterpret_u16_u8(v.raw); +- vst1_lane_u16(p, a, 0); ++ vst1_lane_u16(reinterpret_cast(p), a, 0); + } + HWY_INLINE void StoreU(const Vec128 v, Simd, + uint16_t* HWY_RESTRICT p) { +@@ -2053,7 +2195,7 @@ HWY_INLINE void StoreU(const Vec128 v, Simd, + int8_t* HWY_RESTRICT p) { + int16x4_t a = vreinterpret_s16_s8(v.raw); +- vst1_lane_s16(p, a, 0); ++ vst1_lane_s16(reinterpret_cast(p), a, 0); + } + HWY_INLINE void StoreU(const Vec128 v, Simd, + int16_t* HWY_RESTRICT p) { +@@ -2118,18 +2260,18 @@ HWY_INLINE Vec128 PromoteTo(Fu + const Vec128 v) { + return Vec128(vmovl_u32(v.raw)); + } +-HWY_INLINE Vec128 PromoteTo(Full128 /* tag */, ++HWY_INLINE Vec128 PromoteTo(Full128 d, + const Vec128 v) { +- return Vec128(vmovl_u8(v.raw)); ++ return BitCast(d, Vec128(vmovl_u8(v.raw))); + } +-HWY_INLINE Vec128 PromoteTo(Full128 /* tag */, ++HWY_INLINE Vec128 PromoteTo(Full128 d, + const Vec128 v) { + uint16x8_t a = vmovl_u8(v.raw); +- return Vec128(vreinterpretq_s32_u16(vmovl_u16(vget_low_u16(a)))); ++ return BitCast(d, Vec128(vmovl_u16(vget_low_u16(a)))); + } +-HWY_INLINE Vec128 PromoteTo(Full128 /* tag */, ++HWY_INLINE Vec128 PromoteTo(Full128 d, + const Vec128 v) { +- return Vec128(vmovl_u16(v.raw)); ++ return BitCast(d, Vec128(vmovl_u16(v.raw))); + } + + // Unsigned: zero-extend to half vector. +@@ -2155,9 +2297,9 @@ HWY_INLINE Vec128 PromoteTo + return Vec128(vget_low_u64(vmovl_u32(v.raw))); + } + template +-HWY_INLINE Vec128 PromoteTo(Simd /* tag */, ++HWY_INLINE Vec128 PromoteTo(Simd d, + const Vec128 v) { +- return Vec128(vget_low_s16(vmovl_u8(v.raw))); ++ return BitCast(d, Vec128(vget_low_u16(vmovl_u8(v.raw)))); + } + template + HWY_INLINE Vec128 PromoteTo(Simd /* tag */, +@@ -2220,12 +2362,14 @@ HWY_INLINE Vec128 PromoteTo( + + HWY_INLINE Vec128 PromoteTo(Full128 /* tag */, + const Vec128 v) { +- return Vec128(vcvt_f32_f16(vreinterpret_f16_u16(v.raw))); ++ const float32x4_t f32 = vcvt_f32_f16(vreinterpret_f16_u16(v.raw)); ++ return Vec128(f32); + } + template + HWY_INLINE Vec128 PromoteTo(Simd /* tag */, + const Vec128 v) { +- return Vec128(vget_low_f32(vcvt_f32_f16(v.raw))); ++ const float32x4_t f32 = vcvt_f32_f16(vreinterpret_f16_u16(v.raw)); ++ return Vec128(vget_low_f32(f32)); + } + + #else +@@ -2353,7 +2497,8 @@ HWY_INLINE Vec128 DemoteTo + template + HWY_INLINE Vec128 DemoteTo(Simd /* tag */, + const Vec128 v) { +- return Vec128{vcvt_f16_f32(vcombine_f32(v.raw, v.raw))}; ++ const float16x4_t f16 = vcvt_f16_f32(vcombine_f32(v.raw, v.raw)); ++ return Vec128(vreinterpret_u16_f16(f16)); + } + + #else +@@ -2965,33 +3110,58 @@ HWY_INLINE Vec128 TableLookupBytes + BitCast(d8, from).raw))); + } + +-// ------------------------------ Hard-coded shuffles ++// ------------------------------ TableLookupLanes + +-// Notation: let Vec128 have lanes 3,2,1,0 (0 is least-significant). +-// Shuffle0321 rotates one lane to the right (the previous least-significant +-// lane is now most-significant). These could also be implemented via +-// CombineShiftRightBytes but the shuffle_abcd notation is more convenient. ++// Returned by SetTableIndices for use by TableLookupLanes. ++template ++struct Indices128 { ++ typename detail::Raw128::type raw; ++}; + +-// Swap 32-bit halves in 64-bits +-HWY_INLINE Vec128 Shuffle2301(const Vec128 v) { +- return Vec128(vrev64_u32(v.raw)); +-} +-HWY_INLINE Vec128 Shuffle2301(const Vec128 v) { +- return Vec128(vrev64_s32(v.raw)); +-} +-HWY_INLINE Vec128 Shuffle2301(const Vec128 v) { +- return Vec128(vrev64_f32(v.raw)); ++template ++HWY_INLINE Indices128 SetTableIndices(Simd d, const int32_t* idx) { ++#if !defined(NDEBUG) || defined(ADDRESS_SANITIZER) ++ for (size_t i = 0; i < N; ++i) { ++ HWY_DASSERT(0 <= idx[i] && idx[i] < static_cast(N)); ++ } ++#endif ++ ++ const Repartition d8; ++ alignas(16) uint8_t control[16] = {0}; ++ for (size_t idx_lane = 0; idx_lane < N; ++idx_lane) { ++ for (size_t idx_byte = 0; idx_byte < sizeof(T); ++idx_byte) { ++ control[idx_lane * sizeof(T) + idx_byte] = ++ static_cast(idx[idx_lane] * sizeof(T) + idx_byte); ++ } ++ } ++ return Indices128{BitCast(d, Load(d8, control)).raw}; + } +-HWY_INLINE Vec128 Shuffle2301(const Vec128 v) { +- return Vec128(vrev64q_u32(v.raw)); ++ ++template ++HWY_INLINE Vec128 TableLookupLanes( ++ const Vec128 v, const Indices128 idx) { ++ return TableLookupBytes(v, Vec128{idx.raw}); + } +-HWY_INLINE Vec128 Shuffle2301(const Vec128 v) { +- return Vec128(vrev64q_s32(v.raw)); ++template ++HWY_INLINE Vec128 TableLookupLanes( ++ const Vec128 v, const Indices128 idx) { ++ return TableLookupBytes(v, Vec128{idx.raw}); + } +-HWY_INLINE Vec128 Shuffle2301(const Vec128 v) { +- return Vec128(vrev64q_f32(v.raw)); ++template ++HWY_INLINE Vec128 TableLookupLanes(const Vec128 v, ++ const Indices128 idx) { ++ const Simd di; ++ const auto idx_i = BitCast(di, Vec128{idx.raw}); ++ return BitCast(Simd(), TableLookupBytes(BitCast(di, v), idx_i)); + } + ++// ------------------------------ Other shuffles (TableLookupBytes) ++ ++// Notation: let Vec128 have lanes 3,2,1,0 (0 is least-significant). ++// Shuffle0321 rotates one lane to the right (the previous least-significant ++// lane is now most-significant). These could also be implemented via ++// CombineShiftRightBytes but the shuffle_abcd notation is more convenient. ++ + // Swap 64-bit halves + template + HWY_INLINE Vec128 Shuffle1032(const Vec128 v) { +@@ -3029,49 +3199,6 @@ HWY_INLINE Vec128 Shuffle0123(const V + return TableLookupBytes(v, BitCast(d, Load(d8, bytes))); + } + +-// ------------------------------ TableLookupLanes +- +-// Returned by SetTableIndices for use by TableLookupLanes. +-template +-struct Indices128 { +- typename Raw128::type raw; +-}; +- +-template +-HWY_INLINE Indices128 SetTableIndices(const Full128, const int32_t* idx) { +-#if !defined(NDEBUG) || defined(ADDRESS_SANITIZER) +- const size_t N = 16 / sizeof(T); +- for (size_t i = 0; i < N; ++i) { +- HWY_DASSERT(0 <= idx[i] && idx[i] < static_cast(N)); +- } +-#endif +- +- const Full128 d8; +- alignas(16) uint8_t control[16]; +- for (size_t idx_byte = 0; idx_byte < 16; ++idx_byte) { +- const size_t idx_lane = idx_byte / sizeof(T); +- const size_t mod = idx_byte % sizeof(T); +- control[idx_byte] = idx[idx_lane] * sizeof(T) + mod; +- } +- return Indices128{BitCast(Full128(), Load(d8, control)).raw}; +-} +- +-HWY_INLINE Vec128 TableLookupLanes(const Vec128 v, +- const Indices128 idx) { +- return TableLookupBytes(v, Vec128(idx.raw)); +-} +-HWY_INLINE Vec128 TableLookupLanes(const Vec128 v, +- const Indices128 idx) { +- return TableLookupBytes(v, Vec128(idx.raw)); +-} +-HWY_INLINE Vec128 TableLookupLanes(const Vec128 v, +- const Indices128 idx) { +- const Full128 di; +- const Full128 df; +- return BitCast(df, +- TableLookupBytes(BitCast(di, v), Vec128(idx.raw))); +-} +- + // ------------------------------ Interleave lanes + + // Interleaves lanes from halves of the 128-bit blocks of "a" (which provides +@@ -3334,16 +3461,6 @@ HWY_INLINE Vec128 OddEven(const Vec12 + + // ================================================== MISC + +-// Returns a vector with lane i=[0, N) set to "first" + i. +-template +-Vec128 Iota(const Simd d, const T2 first) { +- HWY_ALIGN T lanes[16 / sizeof(T)]; +- for (size_t i = 0; i < 16 / sizeof(T); ++i) { +- lanes[i] = static_cast(first + static_cast(i)); +- } +- return Load(d, lanes); +-} +- + // ------------------------------ Scatter (Store) + + template +@@ -3413,52 +3530,44 @@ HWY_API Vec128 GatherIndex(const S + return Load(d, lanes); + } + +-// ------------------------------ ARMv7 int64 comparisons (requires Shuffle2301) ++// ------------------------------ Reductions + +-#if HWY_ARCH_ARM_V7 ++namespace detail { + +-template +-HWY_INLINE Mask128 operator==(const Vec128 a, +- const Vec128 b) { +- const Simd d32; +- const Simd d64; +- const auto cmp32 = VecFromMask(d32, BitCast(d32, a) == BitCast(d32, b)); +- const auto cmp64 = cmp32 & Shuffle2301(cmp32); +- return MaskFromVec(BitCast(d64, cmp64)); ++// N=1 for any T: no-op ++template ++HWY_API Vec128 SumOfLanes(const Vec128 v) { ++ return v; + } +- +-template +-HWY_INLINE Mask128 operator==(const Vec128 a, +- const Vec128 b) { +- const Simd d32; +- const Simd d64; +- const auto cmp32 = VecFromMask(d32, BitCast(d32, a) == BitCast(d32, b)); +- const auto cmp64 = cmp32 & Shuffle2301(cmp32); +- return MaskFromVec(BitCast(d64, cmp64)); ++template ++HWY_API Vec128 MinOfLanes(hwy::SizeTag /* tag */, ++ const Vec128 v) { ++ return v; ++} ++template ++HWY_API Vec128 MaxOfLanes(hwy::SizeTag /* tag */, ++ const Vec128 v) { ++ return v; + } + +-HWY_INLINE Mask128 operator<(const Vec128 a, +- const Vec128 b) { +- const int64x2_t sub = vqsubq_s64(a.raw, b.raw); +- return MaskFromVec(BroadcastSignBit(Vec128(sub))); ++// u32/i32/f32: N=2 ++template ++HWY_API Vec128 SumOfLanes(const Vec128 v10) { ++ return v10 + Shuffle2301(v10); + } +-HWY_INLINE Mask128 operator<(const Vec128 a, +- const Vec128 b) { +- const int64x1_t sub = vqsub_s64(a.raw, b.raw); +- return MaskFromVec(BroadcastSignBit(Vec128(sub))); ++template ++HWY_API Vec128 MinOfLanes(hwy::SizeTag<4> /* tag */, ++ const Vec128 v10) { ++ return Min(v10, Shuffle2301(v10)); + } +- +-template +-HWY_INLINE Mask128 operator>(const Vec128 a, +- const Vec128 b) { +- return b < a; ++template ++HWY_API Vec128 MaxOfLanes(hwy::SizeTag<4> /* tag */, ++ const Vec128 v10) { ++ return Max(v10, Shuffle2301(v10)); + } +-#endif +- +-// ------------------------------ Reductions + ++// full vectors + #if HWY_ARCH_ARM_A64 +-// Supported for 32b and 64b vector types. Returns the sum in each lane. + HWY_INLINE Vec128 SumOfLanes(const Vec128 v) { + return Vec128(vdupq_n_u32(vaddvq_u32(v.raw))); + } +@@ -3505,20 +3614,15 @@ HWY_INLINE Vec128 SumOfLanes(co + } + #endif + +-namespace detail { +- +-// For u32/i32/f32. +-template +-HWY_API Vec128 MinOfLanes(hwy::SizeTag<4> /* tag */, +- const Vec128 v3210) { ++template ++HWY_API Vec128 MinOfLanes(hwy::SizeTag<4> /* tag */, const Vec128 v3210) { + const Vec128 v1032 = Shuffle1032(v3210); + const Vec128 v31_20_31_20 = Min(v3210, v1032); + const Vec128 v20_31_20_31 = Shuffle0321(v31_20_31_20); + return Min(v20_31_20_31, v31_20_31_20); + } +-template +-HWY_API Vec128 MaxOfLanes(hwy::SizeTag<4> /* tag */, +- const Vec128 v3210) { ++template ++HWY_API Vec128 MaxOfLanes(hwy::SizeTag<4> /* tag */, const Vec128 v3210) { + const Vec128 v1032 = Shuffle1032(v3210); + const Vec128 v31_20_31_20 = Max(v3210, v1032); + const Vec128 v20_31_20_31 = Shuffle0321(v31_20_31_20); +@@ -3526,15 +3630,13 @@ HWY_API Vec128 MaxOfLanes(hwy::Siz + } + + // For u64/i64[/f64]. +-template +-HWY_API Vec128 MinOfLanes(hwy::SizeTag<8> /* tag */, +- const Vec128 v10) { ++template ++HWY_API Vec128 MinOfLanes(hwy::SizeTag<8> /* tag */, const Vec128 v10) { + const Vec128 v01 = Shuffle01(v10); + return Min(v10, v01); + } +-template +-HWY_API Vec128 MaxOfLanes(hwy::SizeTag<8> /* tag */, +- const Vec128 v10) { ++template ++HWY_API Vec128 MaxOfLanes(hwy::SizeTag<8> /* tag */, const Vec128 v10) { + const Vec128 v01 = Shuffle01(v10); + return Max(v10, v01); + } +@@ -3542,6 +3644,10 @@ HWY_API Vec128 MaxOfLanes(hwy::Siz + } // namespace detail + + template ++HWY_API Vec128 SumOfLanes(const Vec128 v) { ++ return detail::SumOfLanes(v); ++} ++template + HWY_API Vec128 MinOfLanes(const Vec128 v) { + return detail::MinOfLanes(hwy::SizeTag(), v); + } +@@ -3569,13 +3675,13 @@ HWY_INLINE uint64_t BitsFromMask(hwy::Si + const uint8x8_t x2 = vget_low_u8(vpaddq_u8(values.raw, values.raw)); + const uint8x8_t x4 = vpadd_u8(x2, x2); + const uint8x8_t x8 = vpadd_u8(x4, x4); +- return vreinterpret_u16_u8(x8)[0]; ++ return vget_lane_u64(vreinterpret_u64_u8(x8), 0); + #else + // Don't have vpaddq, so keep doubling lane size. + const uint16x8_t x2 = vpaddlq_u8(values.raw); + const uint32x4_t x4 = vpaddlq_u16(x2); + const uint64x2_t x8 = vpaddlq_u32(x4); +- return (uint64_t(x8[1]) << 8) | x8[0]; ++ return (vgetq_lane_u64(x8, 1) << 8) | vgetq_lane_u64(x8, 0); + #endif + } + +@@ -3725,7 +3831,7 @@ HWY_INLINE size_t CountTrue(hwy::SizeTag + const int16x8_t x2 = vpaddlq_s8(ones); + const int32x4_t x4 = vpaddlq_s16(x2); + const int64x2_t x8 = vpaddlq_s32(x4); +- return x8[0] + x8[1]; ++ return vgetq_lane_s64(x8, 0) + vgetq_lane_s64(x8, 1); + #endif + } + template +@@ -3739,7 +3845,7 @@ HWY_INLINE size_t CountTrue(hwy::SizeTag + #else + const int32x4_t x2 = vpaddlq_s16(ones); + const int64x2_t x4 = vpaddlq_s32(x2); +- return x4[0] + x4[1]; ++ return vgetq_lane_s64(x4, 0) + vgetq_lane_s64(x4, 1); + #endif + } + +@@ -3753,7 +3859,7 @@ HWY_INLINE size_t CountTrue(hwy::SizeTag + return vaddvq_s32(ones); + #else + const int64x2_t x2 = vpaddlq_s32(ones); +- return x2[0] + x2[1]; ++ return vgetq_lane_s64(x2, 0) + vgetq_lane_s64(x2, 1); + #endif + } + +@@ -3765,10 +3871,10 @@ HWY_INLINE size_t CountTrue(hwy::SizeTag + vnegq_s64(BitCast(di, VecFromMask(Full128(), mask)).raw); + return vaddvq_s64(ones); + #else +- const Full128 di; +- const int64x2_t ones = +- vshrq_n_u64(BitCast(di, VecFromMask(Full128(), mask)).raw, 63); +- return ones[0] + ones[1]; ++ const Full128 du; ++ const auto mask_u = VecFromMask(du, RebindMask(du, mask)); ++ const uint64x2_t ones = vshrq_n_u64(mask_u.raw, 63); ++ return vgetq_lane_u64(ones, 0) + vgetq_lane_u64(ones, 1); + #endif + } + +@@ -3798,11 +3904,13 @@ HWY_INLINE size_t StoreMaskBits(const Ma + template + HWY_INLINE bool AllFalse(const Mask128 m) { + #if HWY_ARCH_ARM_A64 +- return (vmaxvq_u32(m.raw) == 0); ++ const Full128 d32; ++ const auto m32 = MaskFromVec(BitCast(d32, VecFromMask(Full128(), m))); ++ return (vmaxvq_u32(m32.raw) == 0); + #else + const auto v64 = BitCast(Full128(), VecFromMask(Full128(), m)); + uint32x2_t a = vqmovn_u64(v64.raw); +- return vreinterpret_u64_u32(a)[0] == 0; ++ return vget_lane_u64(vreinterpret_u64_u32(a), 0) == 0; + #endif + } + +@@ -4178,6 +4286,7 @@ HWY_API auto Le(V a, V b) -> decltype(a + return a <= b; + } + ++namespace detail { // for code folding + #if HWY_ARCH_ARM_V7 + #undef vuzp1_s8 + #undef vuzp1_u8 +@@ -4265,6 +4374,7 @@ HWY_API auto Le(V a, V b) -> decltype(a + #undef HWY_NEON_DEF_FUNCTION_UINT_8_16_32 + #undef HWY_NEON_DEF_FUNCTION_UINTS + #undef HWY_NEON_EVAL ++} // namespace detail + + // NOLINTNEXTLINE(google-readability-namespace-comments) + } // namespace HWY_NAMESPACE +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/ops/rvv-inl.h.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/ops/rvv-inl.h +--- chromium-92.0.4515.107/third_party/highway/src/hwy/ops/rvv-inl.h.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/ops/rvv-inl.h 2021-07-26 17:10:30.290171587 -0400 +@@ -39,6 +39,11 @@ using TFromV = TFromD>; + hwy::EnableIf>() && !IsFloat>()>* = nullptr + #define HWY_IF_FLOAT_V(V) hwy::EnableIf>()>* = nullptr + ++// kShift = log2 of multiplier: 0 for m1, 1 for m2, -2 for mf4 ++template ++using Full = Simd> (-kShift)) ++ : (HWY_LANES(T) << kShift)>; ++ + // ================================================== MACROS + + // Generate specializations and function definitions using X macros. Although +@@ -58,29 +63,30 @@ namespace detail { // for code folding + + // For given SEW, iterate over all LMUL. Precompute SEW/LMUL => MLEN because the + // preprocessor cannot easily do it. +-#define HWY_RVV_FOREACH_08(X_MACRO, BASE, CHAR, NAME, OP) \ +- X_MACRO(BASE, CHAR, 8, 1, 8, NAME, OP) \ +- X_MACRO(BASE, CHAR, 8, 2, 4, NAME, OP) \ +- X_MACRO(BASE, CHAR, 8, 4, 2, NAME, OP) \ +- X_MACRO(BASE, CHAR, 8, 8, 1, NAME, OP) +- +-#define HWY_RVV_FOREACH_16(X_MACRO, BASE, CHAR, NAME, OP) \ +- X_MACRO(BASE, CHAR, 16, 1, 16, NAME, OP) \ +- X_MACRO(BASE, CHAR, 16, 2, 8, NAME, OP) \ +- X_MACRO(BASE, CHAR, 16, 4, 4, NAME, OP) \ +- X_MACRO(BASE, CHAR, 16, 8, 2, NAME, OP) +- +-#define HWY_RVV_FOREACH_32(X_MACRO, BASE, CHAR, NAME, OP) \ +- X_MACRO(BASE, CHAR, 32, 1, 32, NAME, OP) \ +- X_MACRO(BASE, CHAR, 32, 2, 16, NAME, OP) \ +- X_MACRO(BASE, CHAR, 32, 4, 8, NAME, OP) \ +- X_MACRO(BASE, CHAR, 32, 8, 4, NAME, OP) +- +-#define HWY_RVV_FOREACH_64(X_MACRO, BASE, CHAR, NAME, OP) \ +- X_MACRO(BASE, CHAR, 64, 1, 64, NAME, OP) \ +- X_MACRO(BASE, CHAR, 64, 2, 32, NAME, OP) \ +- X_MACRO(BASE, CHAR, 64, 4, 16, NAME, OP) \ +- X_MACRO(BASE, CHAR, 64, 8, 8, NAME, OP) ++// TODO(janwas): GCC does not yet support fractional LMUL ++#define HWY_RVV_FOREACH_08(X_MACRO, BASE, CHAR, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 8, m1, /*kShift=*/0, /*MLEN=*/8, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 8, m2, /*kShift=*/1, /*MLEN=*/4, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 8, m4, /*kShift=*/2, /*MLEN=*/2, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 8, m8, /*kShift=*/3, /*MLEN=*/1, NAME, OP) ++ ++#define HWY_RVV_FOREACH_16(X_MACRO, BASE, CHAR, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 16, m1, /*kShift=*/0, /*MLEN=*/16, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 16, m2, /*kShift=*/1, /*MLEN=*/8, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 16, m4, /*kShift=*/2, /*MLEN=*/4, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 16, m8, /*kShift=*/3, /*MLEN=*/2, NAME, OP) ++ ++#define HWY_RVV_FOREACH_32(X_MACRO, BASE, CHAR, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 32, m1, /*kShift=*/0, /*MLEN=*/32, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 32, m2, /*kShift=*/1, /*MLEN=*/16, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 32, m4, /*kShift=*/2, /*MLEN=*/8, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 32, m8, /*kShift=*/3, /*MLEN=*/4, NAME, OP) ++ ++#define HWY_RVV_FOREACH_64(X_MACRO, BASE, CHAR, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 64, m1, /*kShift=*/0, /*MLEN=*/64, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 64, m2, /*kShift=*/1, /*MLEN=*/32, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 64, m4, /*kShift=*/2, /*MLEN=*/16, NAME, OP) \ ++ X_MACRO(BASE, CHAR, 64, m8, /*kShift=*/3, /*MLEN=*/8, NAME, OP) + + // SEW for unsigned: + #define HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP) \ +@@ -153,63 +159,61 @@ namespace detail { // for code folding + + // Assemble types for use in x-macros + #define HWY_RVV_T(BASE, SEW) BASE##SEW##_t +-#define HWY_RVV_D(CHAR, SEW, LMUL) D##CHAR##SEW##m##LMUL +-#define HWY_RVV_V(BASE, SEW, LMUL) v##BASE##SEW##m##LMUL##_t ++#define HWY_RVV_D(CHAR, SEW, LMUL) D##CHAR##SEW##LMUL ++#define HWY_RVV_V(BASE, SEW, LMUL) v##BASE##SEW##LMUL##_t + #define HWY_RVV_M(MLEN) vbool##MLEN##_t + + } // namespace detail + + // TODO(janwas): remove typedefs and only use HWY_RVV_V etc. directly + +-// TODO(janwas): do we want fractional LMUL? (can encode as negative) +-// Mixed-precision code can use LMUL 1..8 and that should be enough unless they +-// need many registers. +-#define HWY_SPECIALIZE(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ +- using HWY_RVV_D(CHAR, SEW, LMUL) = \ +- Simd; \ +- using V##CHAR##SEW##m##LMUL = HWY_RVV_V(BASE, SEW, LMUL); \ +- template <> \ +- struct DFromV_t { \ +- using Lane = HWY_RVV_T(BASE, SEW); \ +- using type = Simd; \ ++// Until we have full intrinsic support for fractional LMUL, mixed-precision ++// code can use LMUL 1..8 (adequate unless they need many registers). ++#define HWY_SPECIALIZE(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ ++ using HWY_RVV_D(CHAR, SEW, LMUL) = Full; \ ++ using V##CHAR##SEW##LMUL = HWY_RVV_V(BASE, SEW, LMUL); \ ++ template <> \ ++ struct DFromV_t { \ ++ using Lane = HWY_RVV_T(BASE, SEW); \ ++ using type = Full; \ + }; + using Vf16m1 = vfloat16m1_t; + using Vf16m2 = vfloat16m2_t; + using Vf16m4 = vfloat16m4_t; + using Vf16m8 = vfloat16m8_t; +-using Df16m1 = Simd; +-using Df16m2 = Simd; +-using Df16m4 = Simd; +-using Df16m8 = Simd; ++using Df16m1 = Full; ++using Df16m2 = Full; ++using Df16m4 = Full; ++using Df16m8 = Full; + + HWY_RVV_FOREACH(HWY_SPECIALIZE, _, _) + #undef HWY_SPECIALIZE + + // vector = f(d), e.g. Zero +-#define HWY_RVV_RETV_ARGD(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ ++#define HWY_RVV_RETV_ARGD(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ + HWY_API HWY_RVV_V(BASE, SEW, LMUL) NAME(HWY_RVV_D(CHAR, SEW, LMUL) d) { \ + (void)Lanes(d); \ +- return v##OP##_##CHAR##SEW##m##LMUL(); \ ++ return v##OP##_##CHAR##SEW##LMUL(); \ + } + + // vector = f(vector), e.g. Not +-#define HWY_RVV_RETV_ARGV(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ ++#define HWY_RVV_RETV_ARGV(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ + HWY_API HWY_RVV_V(BASE, SEW, LMUL) NAME(HWY_RVV_V(BASE, SEW, LMUL) v) { \ +- return v##OP##_v_##CHAR##SEW##m##LMUL(v); \ ++ return v##OP##_v_##CHAR##SEW##LMUL(v); \ + } + + // vector = f(vector, scalar), e.g. detail::Add +-#define HWY_RVV_RETV_ARGVS(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ +- HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ +- NAME(HWY_RVV_V(BASE, SEW, LMUL) a, HWY_RVV_T(BASE, SEW) b) { \ +- return v##OP##_##CHAR##SEW##m##LMUL(a, b); \ ++#define HWY_RVV_RETV_ARGVS(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ ++ HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ ++ NAME(HWY_RVV_V(BASE, SEW, LMUL) a, HWY_RVV_T(BASE, SEW) b) { \ ++ return v##OP##_##CHAR##SEW##LMUL(a, b); \ + } + + // vector = f(vector, vector), e.g. Add +-#define HWY_RVV_RETV_ARGVV(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ ++#define HWY_RVV_RETV_ARGVV(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ + HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ + NAME(HWY_RVV_V(BASE, SEW, LMUL) a, HWY_RVV_V(BASE, SEW, LMUL) b) { \ +- return v##OP##_vv_##CHAR##SEW##m##LMUL(a, b); \ ++ return v##OP##_vv_##CHAR##SEW##LMUL(a, b); \ + } + + // ================================================== INIT +@@ -218,9 +222,9 @@ HWY_RVV_FOREACH(HWY_SPECIALIZE, _, _) + + // WARNING: we want to query VLMAX/sizeof(T), but this actually changes VL! + // vlenb is not exposed through intrinsics and vreadvl is not VLMAX. +-#define HWY_RVV_LANES(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ +- HWY_API size_t NAME(HWY_RVV_D(CHAR, SEW, LMUL) /* d */) { \ +- return v##OP##SEW##m##LMUL(); \ ++#define HWY_RVV_LANES(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ ++ HWY_API size_t NAME(HWY_RVV_D(CHAR, SEW, LMUL) /* d */) { \ ++ return v##OP##SEW##LMUL(); \ + } + + HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e) +@@ -233,19 +237,31 @@ HWY_RVV_FOREACH(HWY_RVV_RETV_ARGD, Zero, + template + using VFromD = decltype(Zero(D())); + ++// Partial ++template ++HWY_API VFromD> Zero(Simd /*tag*/) { ++ return Zero(Full()); ++} ++ + // ------------------------------ Set + // vector = f(d, scalar), e.g. Set +-#define HWY_RVV_SET(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ ++#define HWY_RVV_SET(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ + HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ + NAME(HWY_RVV_D(CHAR, SEW, LMUL) d, HWY_RVV_T(BASE, SEW) arg) { \ + (void)Lanes(d); \ +- return v##OP##_##CHAR##SEW##m##LMUL(arg); \ ++ return v##OP##_##CHAR##SEW##LMUL(arg); \ + } + + HWY_RVV_FOREACH_UI(HWY_RVV_SET, Set, mv_v_x) + HWY_RVV_FOREACH_F(HWY_RVV_SET, Set, fmv_v_f) + #undef HWY_RVV_SET + ++// Partial vectors ++template ++HWY_API VFromD> Set(Simd /*tag*/, T arg) { ++ return Set(Full(), arg); ++} ++ + // ------------------------------ Undefined + + // RVV vundefined is 'poisoned' such that even XORing a _variable_ initialized +@@ -265,7 +281,7 @@ HWY_API VFromD Undefined(D d) { + namespace detail { + + // u8: no change +-#define HWY_RVV_CAST_NOP(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ ++#define HWY_RVV_CAST_NOP(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ + HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ + BitCastToByte(HWY_RVV_V(BASE, SEW, LMUL) v) { \ + return v; \ +@@ -276,25 +292,25 @@ namespace detail { + } + + // Other integers +-#define HWY_RVV_CAST_UI(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ +- HWY_API vuint8m##LMUL##_t BitCastToByte(HWY_RVV_V(BASE, SEW, LMUL) v) { \ +- return v##OP##_v_##CHAR##SEW##m##LMUL##_u8m##LMUL(v); \ +- } \ +- HWY_API HWY_RVV_V(BASE, SEW, LMUL) BitCastFromByte( \ +- HWY_RVV_D(CHAR, SEW, LMUL) /* d */, vuint8m##LMUL##_t v) { \ +- return v##OP##_v_u8m##LMUL##_##CHAR##SEW##m##LMUL(v); \ ++#define HWY_RVV_CAST_UI(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ ++ HWY_API vuint8##LMUL##_t BitCastToByte(HWY_RVV_V(BASE, SEW, LMUL) v) { \ ++ return v##OP##_v_##CHAR##SEW##LMUL##_u8##LMUL(v); \ ++ } \ ++ HWY_API HWY_RVV_V(BASE, SEW, LMUL) BitCastFromByte( \ ++ HWY_RVV_D(CHAR, SEW, LMUL) /* d */, vuint8##LMUL##_t v) { \ ++ return v##OP##_v_u8##LMUL##_##CHAR##SEW##LMUL(v); \ + } + + // Float: first cast to/from unsigned +-#define HWY_RVV_CAST_F(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ +- HWY_API vuint8m##LMUL##_t BitCastToByte(HWY_RVV_V(BASE, SEW, LMUL) v) { \ +- return v##OP##_v_u##SEW##m##LMUL##_u8m##LMUL( \ +- v##OP##_v_f##SEW##m##LMUL##_u##SEW##m##LMUL(v)); \ +- } \ +- HWY_API HWY_RVV_V(BASE, SEW, LMUL) BitCastFromByte( \ +- HWY_RVV_D(CHAR, SEW, LMUL) /* d */, vuint8m##LMUL##_t v) { \ +- return v##OP##_v_u##SEW##m##LMUL##_f##SEW##m##LMUL( \ +- v##OP##_v_u8m##LMUL##_u##SEW##m##LMUL(v)); \ ++#define HWY_RVV_CAST_F(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ ++ HWY_API vuint8##LMUL##_t BitCastToByte(HWY_RVV_V(BASE, SEW, LMUL) v) { \ ++ return v##OP##_v_u##SEW##LMUL##_u8##LMUL( \ ++ v##OP##_v_f##SEW##LMUL##_u##SEW##LMUL(v)); \ ++ } \ ++ HWY_API HWY_RVV_V(BASE, SEW, LMUL) BitCastFromByte( \ ++ HWY_RVV_D(CHAR, SEW, LMUL) /* d */, vuint8##LMUL##_t v) { \ ++ return v##OP##_v_u##SEW##LMUL##_f##SEW##LMUL( \ ++ v##OP##_v_u8##LMUL##_u##SEW##LMUL(v)); \ + } + + HWY_RVV_FOREACH_U08(HWY_RVV_CAST_NOP, _, _) +@@ -315,6 +331,12 @@ HWY_API VFromD BitCast(D d, FromV v) + return detail::BitCastFromByte(d, detail::BitCastToByte(v)); + } + ++// Partial ++template ++HWY_API VFromD> BitCast(Simd /*tag*/, FromV v) { ++ return BitCast(Full(), v); ++} ++ + namespace detail { + + template >> +@@ -336,6 +358,12 @@ HWY_API VFromD Iota0(const D /*d*/) + return BitCastToUnsigned(Iota0(DU())); + } + ++// Partial ++template ++HWY_API VFromD> Iota0(Simd /*tag*/) { ++ return Iota0(Full()); ++} ++ + } // namespace detail + + // ================================================== LOGICAL +@@ -370,11 +398,11 @@ HWY_API V And(const V a, const V b) { + // ------------------------------ Or + + // Scalar argument plus mask. Used by VecFromMask. +-#define HWY_RVV_OR_MASK(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ ++#define HWY_RVV_OR_MASK(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ + HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ + NAME(HWY_RVV_V(BASE, SEW, LMUL) v, HWY_RVV_T(BASE, SEW) imm, \ + HWY_RVV_M(MLEN) mask, HWY_RVV_V(BASE, SEW, LMUL) maskedoff) { \ +- return v##OP##_##CHAR##SEW##m##LMUL##_m(mask, maskedoff, v, imm); \ ++ return v##OP##_##CHAR##SEW##LMUL##_m(mask, maskedoff, v, imm); \ + } + + namespace detail { +@@ -466,14 +494,14 @@ HWY_RVV_FOREACH_U16(HWY_RVV_RETV_ARGVV, + // ------------------------------ ShiftLeft[Same] + + // Intrinsics do not define .vi forms, so use .vx instead. +-#define HWY_RVV_SHIFT(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ +- template \ +- HWY_API HWY_RVV_V(BASE, SEW, LMUL) NAME(HWY_RVV_V(BASE, SEW, LMUL) v) { \ +- return v##OP##_vx_##CHAR##SEW##m##LMUL(v, kBits); \ +- } \ +- HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ +- NAME##Same(HWY_RVV_V(BASE, SEW, LMUL) v, int bits) { \ +- return v##OP##_vx_##CHAR##SEW##m##LMUL(v, static_cast(bits)); \ ++#define HWY_RVV_SHIFT(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ ++ template \ ++ HWY_API HWY_RVV_V(BASE, SEW, LMUL) NAME(HWY_RVV_V(BASE, SEW, LMUL) v) { \ ++ return v##OP##_vx_##CHAR##SEW##LMUL(v, kBits); \ ++ } \ ++ HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ ++ NAME##Same(HWY_RVV_V(BASE, SEW, LMUL) v, int bits) { \ ++ return v##OP##_vx_##CHAR##SEW##LMUL(v, static_cast(bits)); \ + } + + HWY_RVV_FOREACH_UI(HWY_RVV_SHIFT, ShiftLeft, sll) +@@ -486,19 +514,18 @@ HWY_RVV_FOREACH_I(HWY_RVV_SHIFT, ShiftRi + #undef HWY_RVV_SHIFT + + // ------------------------------ Shl +-#define HWY_RVV_SHIFT_VV(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ ++#define HWY_RVV_SHIFT_VV(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ + HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ + NAME(HWY_RVV_V(BASE, SEW, LMUL) v, HWY_RVV_V(BASE, SEW, LMUL) bits) { \ +- return v##OP##_vv_##CHAR##SEW##m##LMUL(v, bits); \ ++ return v##OP##_vv_##CHAR##SEW##LMUL(v, bits); \ + } + + HWY_RVV_FOREACH_U(HWY_RVV_SHIFT_VV, Shl, sll) + +-#define HWY_RVV_SHIFT_II(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ ++#define HWY_RVV_SHIFT_II(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ + HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ + NAME(HWY_RVV_V(BASE, SEW, LMUL) v, HWY_RVV_V(BASE, SEW, LMUL) bits) { \ +- return v##OP##_vv_##CHAR##SEW##m##LMUL(v, \ +- detail::BitCastToUnsigned(bits)); \ ++ return v##OP##_vv_##CHAR##SEW##LMUL(v, detail::BitCastToUnsigned(bits)); \ + } + + HWY_RVV_FOREACH_I(HWY_RVV_SHIFT_II, Shl, sll) +@@ -569,11 +596,11 @@ HWY_API V ApproximateReciprocalSqrt(cons + + // ------------------------------ MulAdd + // Note: op is still named vv, not vvv. +-#define HWY_RVV_FMA(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ ++#define HWY_RVV_FMA(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ + HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ + NAME(HWY_RVV_V(BASE, SEW, LMUL) mul, HWY_RVV_V(BASE, SEW, LMUL) x, \ + HWY_RVV_V(BASE, SEW, LMUL) add) { \ +- return v##OP##_vv_##CHAR##SEW##m##LMUL(add, mul, x); \ ++ return v##OP##_vv_##CHAR##SEW##LMUL(add, mul, x); \ + } + + HWY_RVV_FOREACH_F(HWY_RVV_FMA, MulAdd, fmacc) +@@ -596,11 +623,11 @@ HWY_RVV_FOREACH_F(HWY_RVV_FMA, NegMulSub + // of all bits; SLEN 8 / LMUL 4 = half of all bits. + + // mask = f(vector, vector) +-#define HWY_RVV_RETM_ARGVV(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ ++#define HWY_RVV_RETM_ARGVV(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ + HWY_API HWY_RVV_M(MLEN) \ + NAME(HWY_RVV_V(BASE, SEW, LMUL) a, HWY_RVV_V(BASE, SEW, LMUL) b) { \ + (void)Lanes(DFromV()); \ +- return v##OP##_vv_##CHAR##SEW##m##LMUL##_b##MLEN(a, b); \ ++ return v##OP##_vv_##CHAR##SEW##LMUL##_b##MLEN(a, b); \ + } + + // ------------------------------ Eq +@@ -675,11 +702,11 @@ HWY_RVV_FOREACH_B(HWY_RVV_RETM_ARGMM, Xo + #undef HWY_RVV_RETM_ARGMM + + // ------------------------------ IfThenElse +-#define HWY_RVV_IF_THEN_ELSE(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ +- HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ +- NAME(HWY_RVV_M(MLEN) m, HWY_RVV_V(BASE, SEW, LMUL) yes, \ +- HWY_RVV_V(BASE, SEW, LMUL) no) { \ +- return v##OP##_vvm_##CHAR##SEW##m##LMUL(m, no, yes); \ ++#define HWY_RVV_IF_THEN_ELSE(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ ++ HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ ++ NAME(HWY_RVV_M(MLEN) m, HWY_RVV_V(BASE, SEW, LMUL) yes, \ ++ HWY_RVV_V(BASE, SEW, LMUL) no) { \ ++ return v##OP##_vvm_##CHAR##SEW##LMUL(m, no, yes); \ + } + + HWY_RVV_FOREACH(HWY_RVV_IF_THEN_ELSE, IfThenElse, merge) +@@ -774,17 +801,17 @@ HWY_RVV_FOREACH_B(HWY_RVV_COUNT_TRUE, _, + + // ------------------------------ Load + +-#define HWY_RVV_LOAD(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ +- HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ +- NAME(HWY_RVV_D(CHAR, SEW, LMUL) d, \ +- const HWY_RVV_T(BASE, SEW) * HWY_RESTRICT p) { \ +- (void)Lanes(d); \ +- return v##OP##SEW##_v_##CHAR##SEW##m##LMUL(p); \ ++#define HWY_RVV_LOAD(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ ++ HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ ++ NAME(HWY_RVV_D(CHAR, SEW, LMUL) d, \ ++ const HWY_RVV_T(BASE, SEW) * HWY_RESTRICT p) { \ ++ (void)Lanes(d); \ ++ return v##OP##SEW##_v_##CHAR##SEW##LMUL(p); \ + } + HWY_RVV_FOREACH(HWY_RVV_LOAD, Load, le) + #undef HWY_RVV_LOAD + +-// Partial load ++// Partial + template + HWY_API VFromD> Load(Simd d, const T* HWY_RESTRICT p) { + return Load(d, p); +@@ -800,16 +827,22 @@ HWY_API VFromD LoadU(D d, const TFrom + + // ------------------------------ Store + +-#define HWY_RVV_RET_ARGVDP(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ +- HWY_API void NAME(HWY_RVV_V(BASE, SEW, LMUL) v, \ +- HWY_RVV_D(CHAR, SEW, LMUL) d, \ +- HWY_RVV_T(BASE, SEW) * HWY_RESTRICT p) { \ +- (void)Lanes(d); \ +- return v##OP##SEW##_v_##CHAR##SEW##m##LMUL(p, v); \ ++#define HWY_RVV_RET_ARGVDP(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ ++ HWY_API void NAME(HWY_RVV_V(BASE, SEW, LMUL) v, \ ++ HWY_RVV_D(CHAR, SEW, LMUL) d, \ ++ HWY_RVV_T(BASE, SEW) * HWY_RESTRICT p) { \ ++ (void)Lanes(d); \ ++ return v##OP##SEW##_v_##CHAR##SEW##LMUL(p, v); \ + } + HWY_RVV_FOREACH(HWY_RVV_RET_ARGVDP, Store, se) + #undef HWY_RVV_RET_ARGVDP + ++// Partial ++template ++HWY_API void Store(VFromD> v, Simd d, T* HWY_RESTRICT p) { ++ return Store(v, Full(), p); ++} ++ + // ------------------------------ StoreU + + // RVV only requires lane alignment, not natural alignment of the entire vector. +@@ -963,67 +996,6 @@ HWY_API VFromD> Promote + return BitCast(d, PromoteTo(Simd(), v)); + } + +-// ------------------------------ PromoteTo I +- +-HWY_API Vi16m2 PromoteTo(Di16m2 /* d */, Vi8m1 v) { return vsext_vf2_i16m2(v); } +-HWY_API Vi16m4 PromoteTo(Di16m4 /* d */, Vi8m2 v) { return vsext_vf2_i16m4(v); } +-HWY_API Vi16m8 PromoteTo(Di16m8 /* d */, Vi8m4 v) { return vsext_vf2_i16m8(v); } +- +-HWY_API Vi32m4 PromoteTo(Di32m4 /* d */, Vi8m1 v) { return vsext_vf4_i32m4(v); } +-HWY_API Vi32m8 PromoteTo(Di32m8 /* d */, Vi8m2 v) { return vsext_vf4_i32m8(v); } +- +-HWY_API Vi32m2 PromoteTo(Di32m2 /* d */, const Vi16m1 v) { +- return vsext_vf2_i32m2(v); +-} +-HWY_API Vi32m4 PromoteTo(Di32m4 /* d */, const Vi16m2 v) { +- return vsext_vf2_i32m4(v); +-} +-HWY_API Vi32m8 PromoteTo(Di32m8 /* d */, const Vi16m4 v) { +- return vsext_vf2_i32m8(v); +-} +- +-HWY_API Vi64m2 PromoteTo(Di64m2 /* d */, const Vi32m1 v) { +- return vsext_vf2_i64m2(v); +-} +-HWY_API Vi64m4 PromoteTo(Di64m4 /* d */, const Vi32m2 v) { +- return vsext_vf2_i64m4(v); +-} +-HWY_API Vi64m8 PromoteTo(Di64m8 /* d */, const Vi32m4 v) { +- return vsext_vf2_i64m8(v); +-} +- +-// ------------------------------ PromoteTo F +- +-HWY_API Vf32m2 PromoteTo(Df32m2 /* d */, const Vf16m1 v) { +- return vfwcvt_f_f_v_f32m2(v); +-} +-HWY_API Vf32m4 PromoteTo(Df32m4 /* d */, const Vf16m2 v) { +- return vfwcvt_f_f_v_f32m4(v); +-} +-HWY_API Vf32m8 PromoteTo(Df32m8 /* d */, const Vf16m4 v) { +- return vfwcvt_f_f_v_f32m8(v); +-} +- +-HWY_API Vf64m2 PromoteTo(Df64m2 /* d */, const Vf32m1 v) { +- return vfwcvt_f_f_v_f64m2(v); +-} +-HWY_API Vf64m4 PromoteTo(Df64m4 /* d */, const Vf32m2 v) { +- return vfwcvt_f_f_v_f64m4(v); +-} +-HWY_API Vf64m8 PromoteTo(Df64m8 /* d */, const Vf32m4 v) { +- return vfwcvt_f_f_v_f64m8(v); +-} +- +-HWY_API Vf64m2 PromoteTo(Df64m2 /* d */, const Vi32m1 v) { +- return vfwcvt_f_x_v_f64m2(v); +-} +-HWY_API Vf64m4 PromoteTo(Df64m4 /* d */, const Vi32m2 v) { +- return vfwcvt_f_x_v_f64m4(v); +-} +-HWY_API Vf64m8 PromoteTo(Df64m8 /* d */, const Vi32m4 v) { +- return vfwcvt_f_x_v_f64m8(v); +-} +- + // ------------------------------ DemoteTo U + + // First clamp negative numbers to zero to match x86 packus. +@@ -1124,19 +1096,19 @@ HWY_API Vi32m4 DemoteTo(Di32m4 /* d */, + + // ------------------------------ ConvertTo F + +-#define HWY_RVV_CONVERT(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ ++#define HWY_RVV_CONVERT(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ + HWY_API HWY_RVV_V(BASE, SEW, LMUL) ConvertTo( \ + HWY_RVV_D(CHAR, SEW, LMUL) /* d */, HWY_RVV_V(int, SEW, LMUL) v) { \ +- return vfcvt_f_x_v_f##SEW##m##LMUL(v); \ ++ return vfcvt_f_x_v_f##SEW##LMUL(v); \ + } \ + /* Truncates (rounds toward zero). */ \ + HWY_API HWY_RVV_V(int, SEW, LMUL) ConvertTo(HWY_RVV_D(i, SEW, LMUL) /* d */, \ + HWY_RVV_V(BASE, SEW, LMUL) v) { \ +- return vfcvt_rtz_x_f_v_i##SEW##m##LMUL(v); \ ++ return vfcvt_rtz_x_f_v_i##SEW##LMUL(v); \ + } \ + /* Uses default rounding mode. */ \ + HWY_API HWY_RVV_V(int, SEW, LMUL) NearestInt(HWY_RVV_V(BASE, SEW, LMUL) v) { \ +- return vfcvt_x_f_v_i##SEW##m##LMUL(v); \ ++ return vfcvt_x_f_v_i##SEW##LMUL(v); \ + } + + // API only requires f32 but we provide f64 for internal use (otherwise, it +@@ -1184,10 +1156,10 @@ HWY_API VFromD SetTableIndices(D d, + + // <32bit are not part of Highway API, but used in Broadcast. This limits VLMAX + // to 2048! We could instead use vrgatherei16. +-#define HWY_RVV_TABLE(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ ++#define HWY_RVV_TABLE(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ + HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ + NAME(HWY_RVV_V(BASE, SEW, LMUL) v, HWY_RVV_V(uint, SEW, LMUL) idx) { \ +- return v##OP##_vv_##CHAR##SEW##m##LMUL(v, idx); \ ++ return v##OP##_vv_##CHAR##SEW##LMUL(v, idx); \ + } + + HWY_RVV_FOREACH(HWY_RVV_TABLE, TableLookupLanes, rgather) +@@ -1279,7 +1251,6 @@ HWY_API V OffsetsOf128BitBlocks(const D + using T = MakeUnsigned>; + return detail::And(iota0, static_cast(~(LanesPerBlock(d) - 1))); + } +- + } // namespace detail + + template +@@ -1307,9 +1278,9 @@ HWY_API V Broadcast(const V v) { + + // ------------------------------ GetLane + +-#define HWY_RVV_GET_LANE(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ +- HWY_API HWY_RVV_T(BASE, SEW) NAME(HWY_RVV_V(BASE, SEW, LMUL) v) { \ +- return v##OP##_s_##CHAR##SEW##m##LMUL##_##CHAR##SEW(v); \ ++#define HWY_RVV_GET_LANE(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ ++ HWY_API HWY_RVV_T(BASE, SEW) NAME(HWY_RVV_V(BASE, SEW, LMUL) v) { \ ++ return v##OP##_s_##CHAR##SEW##LMUL##_##CHAR##SEW(v); \ + } + + HWY_RVV_FOREACH_UI(HWY_RVV_GET_LANE, GetLane, mv_x) +@@ -1318,11 +1289,12 @@ HWY_RVV_FOREACH_F(HWY_RVV_GET_LANE, GetL + + // ------------------------------ ShiftLeftLanes + +-// vector = f(vector, size_t) +-#define HWY_RVV_SLIDE(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ +- HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ +- NAME(HWY_RVV_V(BASE, SEW, LMUL) v, size_t lanes) { \ +- return v##OP##_vx_##CHAR##SEW##m##LMUL(v, v, lanes); \ ++// vector = f(vector, vector, size_t) ++#define HWY_RVV_SLIDE(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ ++ HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ ++ NAME(HWY_RVV_V(BASE, SEW, LMUL) dst, HWY_RVV_V(BASE, SEW, LMUL) src, \ ++ size_t lanes) { \ ++ return v##OP##_vx_##CHAR##SEW##LMUL(dst, src, lanes); \ + } + + namespace detail { +@@ -1333,7 +1305,7 @@ template + HWY_API V ShiftLeftLanes(const V v) { + using D = DFromV; + const RebindToSigned di; +- const auto shifted = detail::SlideUp(v, kLanes); ++ const auto shifted = detail::SlideUp(v, v, kLanes); + // Match x86 semantics by zeroing lower lanes in 128-bit blocks + constexpr size_t kLanesPerBlock = detail::LanesPerBlock(di); + const auto idx_mod = detail::And(detail::Iota0(di), kLanesPerBlock - 1); +@@ -1363,7 +1335,7 @@ template + HWY_API V ShiftRightLanes(const V v) { + using D = DFromV; + const RebindToSigned di; +- const auto shifted = detail::SlideDown(v, kLanes); ++ const auto shifted = detail::SlideDown(v, v, kLanes); + // Match x86 semantics by zeroing upper lanes in 128-bit blocks + constexpr size_t kLanesPerBlock = detail::LanesPerBlock(di); + const auto idx_mod = detail::And(detail::Iota0(di), kLanesPerBlock - 1); +@@ -1405,7 +1377,7 @@ HWY_API V ConcatUpperLower(const V hi, c + template + HWY_API V ConcatLowerLower(const V hi, const V lo) { + // Move lower half into upper +- const auto hi_up = detail::SlideUp(hi, Lanes(DFromV()) / 2); ++ const auto hi_up = detail::SlideUp(hi, hi, Lanes(DFromV()) / 2); + return ConcatUpperLower(hi_up, lo); + } + +@@ -1414,7 +1386,7 @@ HWY_API V ConcatLowerLower(const V hi, c + template + HWY_API V ConcatUpperUpper(const V hi, const V lo) { + // Move upper half into lower +- const auto lo_down = detail::SlideDown(lo, Lanes(DFromV()) / 2); ++ const auto lo_down = detail::SlideDown(lo, lo, Lanes(DFromV()) / 2); + return ConcatUpperLower(hi, lo_down); + } + +@@ -1423,8 +1395,8 @@ HWY_API V ConcatUpperUpper(const V hi, c + template + HWY_API V ConcatLowerUpper(const V hi, const V lo) { + // Move half of both inputs to the other half +- const auto hi_up = detail::SlideUp(hi, Lanes(DFromV()) / 2); +- const auto lo_down = detail::SlideDown(lo, Lanes(DFromV()) / 2); ++ const auto hi_up = detail::SlideUp(hi, hi, Lanes(DFromV()) / 2); ++ const auto lo_down = detail::SlideDown(lo, lo, Lanes(DFromV()) / 2); + return ConcatUpperLower(hi_up, lo_down); + } + +@@ -1491,61 +1463,55 @@ HWY_API V Combine(const V a, const V b) + // ================================================== REDUCE + + // vector = f(vector, zero_m1) +-#define HWY_RVV_REDUCE(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ +- HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ +- NAME(HWY_RVV_V(BASE, SEW, LMUL) v, HWY_RVV_V(BASE, SEW, 1) v0) { \ +- vsetvlmax_e##SEW##m##LMUL(); \ +- return Set(HWY_RVV_D(CHAR, SEW, LMUL)(), \ +- GetLane(v##OP##_vs_##CHAR##SEW##m##LMUL##_##CHAR##SEW##m1( \ +- v0, v, v0))); \ ++#define HWY_RVV_REDUCE(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ ++ HWY_API HWY_RVV_V(BASE, SEW, LMUL) \ ++ NAME(HWY_RVV_V(BASE, SEW, LMUL) v, HWY_RVV_V(BASE, SEW, m1) v0) { \ ++ vsetvlmax_e##SEW##LMUL(); \ ++ return Set( \ ++ HWY_RVV_D(CHAR, SEW, LMUL)(), \ ++ GetLane(v##OP##_vs_##CHAR##SEW##LMUL##_##CHAR##SEW##m1(v0, v, v0))); \ + } + + // ------------------------------ SumOfLanes + + namespace detail { +- + HWY_RVV_FOREACH_UI(HWY_RVV_REDUCE, RedSum, redsum) + HWY_RVV_FOREACH_F(HWY_RVV_REDUCE, RedSum, fredsum) +- + } // namespace detail + + template + HWY_API V SumOfLanes(const V v) { + using T = TFromV; +- const auto v0 = Zero(Simd()); // always m1 ++ const auto v0 = Zero(Full()); // always m1 + return detail::RedSum(v, v0); + } + + // ------------------------------ MinOfLanes + namespace detail { +- + HWY_RVV_FOREACH_U(HWY_RVV_REDUCE, RedMin, redminu) + HWY_RVV_FOREACH_I(HWY_RVV_REDUCE, RedMin, redmin) + HWY_RVV_FOREACH_F(HWY_RVV_REDUCE, RedMin, fredmin) +- + } // namespace detail + + template + HWY_API V MinOfLanes(const V v) { + using T = TFromV; +- const Simd d1; // always m1 ++ const Full d1; // always m1 + const auto neutral = Set(d1, HighestValue()); + return detail::RedMin(v, neutral); + } + + // ------------------------------ MaxOfLanes + namespace detail { +- + HWY_RVV_FOREACH_U(HWY_RVV_REDUCE, RedMax, redmaxu) + HWY_RVV_FOREACH_I(HWY_RVV_REDUCE, RedMax, redmax) + HWY_RVV_FOREACH_F(HWY_RVV_REDUCE, RedMax, fredmax) +- + } // namespace detail + + template + HWY_API V MaxOfLanes(const V v) { + using T = TFromV; +- const Simd d1; // always m1 ++ const Full d1; // always m1 + const auto neutral = Set(d1, LowestValue()); + return detail::RedMax(v, neutral); + } +@@ -1570,7 +1536,7 @@ HWY_API VFromD LoadDup128(D d, const + #define HWY_RVV_STORE_MASK_BITS(MLEN, NAME, OP) \ + HWY_API size_t StoreMaskBits(HWY_RVV_M(MLEN) m, uint8_t* p) { \ + /* LMUL=1 is always enough */ \ +- Simd d8; \ ++ Full d8; \ + const size_t num_bytes = (Lanes(d8) + MLEN - 1) / MLEN; \ + /* TODO(janwas): how to convert vbool* to vuint?*/ \ + /*Store(m, d8, p);*/ \ +@@ -1581,6 +1547,22 @@ HWY_API VFromD LoadDup128(D d, const + HWY_RVV_FOREACH_B(HWY_RVV_STORE_MASK_BITS, _, _) + #undef HWY_RVV_STORE_MASK_BITS + ++// ------------------------------ FirstN (Iota0, Lt, RebindMask, SlideUp) ++ ++// Disallow for 8-bit because Iota is likely to overflow. ++template ++HWY_API MFromD FirstN(const D d, const size_t n) { ++ const RebindToSigned di; ++ return RebindMask(d, Lt(BitCast(di, detail::Iota0(d)), Set(di, n))); ++} ++ ++template ++HWY_API MFromD FirstN(const D d, const size_t n) { ++ const auto zero = Zero(d); ++ const auto one = Set(d, 1); ++ return Eq(detail::SlideUp(one, zero, n), one); ++} ++ + // ------------------------------ Neg + + template +@@ -1589,9 +1571,9 @@ HWY_API V Neg(const V v) { + } + + // vector = f(vector), but argument is repeated +-#define HWY_RVV_RETV_ARGV2(BASE, CHAR, SEW, LMUL, MLEN, NAME, OP) \ ++#define HWY_RVV_RETV_ARGV2(BASE, CHAR, SEW, LMUL, SHIFT, MLEN, NAME, OP) \ + HWY_API HWY_RVV_V(BASE, SEW, LMUL) NAME(HWY_RVV_V(BASE, SEW, LMUL) v) { \ +- return v##OP##_vv_##CHAR##SEW##m##LMUL(v, v); \ ++ return v##OP##_vv_##CHAR##SEW##LMUL(v, v); \ + } + + HWY_RVV_FOREACH_F(HWY_RVV_RETV_ARGV2, Neg, fsgnjn) +@@ -1628,7 +1610,6 @@ template + HWY_API auto UseInt(const V v) -> decltype(MaskFromVec(v)) { + return Lt(Abs(v), Set(DFromV(), MantissaEnd>())); + } +- + } // namespace detail + + template +@@ -1699,10 +1680,8 @@ HWY_API VFromD Iota(const D d, TFromD + // Using vwmul does not work for m8, so use mulh instead. Highway only provides + // MulHigh for 16-bit, so use a private wrapper. + namespace detail { +- + HWY_RVV_FOREACH_U32(HWY_RVV_RETV_ARGVV, MulHigh, mulhu) + HWY_RVV_FOREACH_I32(HWY_RVV_RETV_ARGVV, MulHigh, mulh) +- + } // namespace detail + + template +@@ -1712,7 +1691,7 @@ HWY_API VFromD> dw; +- return BitCast(dw, OddEven(detail::SlideUp(hi, 1), lo)); ++ return BitCast(dw, OddEven(detail::SlideUp(hi, hi, 1), lo)); + } + + // ================================================== END MACROS +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/ops/x86_128-inl.h.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/ops/x86_128-inl.h +--- chromium-92.0.4515.107/third_party/highway/src/hwy/ops/x86_128-inl.h.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/ops/x86_128-inl.h 2021-07-26 17:19:52.153729522 -0400 +@@ -154,27 +154,28 @@ HWY_API Vec128 Zero(Simd + HWY_API Vec128 Set(Simd /* tag */, const uint8_t t) { +- return Vec128{_mm_set1_epi8(t)}; ++ return Vec128{_mm_set1_epi8(static_cast(t))}; // NOLINT + } + template + HWY_API Vec128 Set(Simd /* tag */, const uint16_t t) { +- return Vec128{_mm_set1_epi16(t)}; ++ return Vec128{_mm_set1_epi16(static_cast(t))}; // NOLINT + } + template + HWY_API Vec128 Set(Simd /* tag */, const uint32_t t) { +- return Vec128{_mm_set1_epi32(t)}; ++ return Vec128{_mm_set1_epi32(static_cast(t))}; + } + template + HWY_API Vec128 Set(Simd /* tag */, const uint64_t t) { +- return Vec128{_mm_set1_epi64x(t)}; ++ return Vec128{ ++ _mm_set1_epi64x(static_cast(t))}; // NOLINT + } + template + HWY_API Vec128 Set(Simd /* tag */, const int8_t t) { +- return Vec128{_mm_set1_epi8(t)}; ++ return Vec128{_mm_set1_epi8(static_cast(t))}; // NOLINT + } + template + HWY_API Vec128 Set(Simd /* tag */, const int16_t t) { +- return Vec128{_mm_set1_epi16(t)}; ++ return Vec128{_mm_set1_epi16(static_cast(t))}; // NOLINT + } + template + HWY_API Vec128 Set(Simd /* tag */, const int32_t t) { +@@ -182,7 +183,8 @@ HWY_API Vec128 Set(Simd + HWY_API Vec128 Set(Simd /* tag */, const int64_t t) { +- return Vec128{_mm_set1_epi64x(t)}; ++ return Vec128{ ++ _mm_set1_epi64x(static_cast(t))}; // NOLINT + } + template + HWY_API Vec128 Set(Simd /* tag */, const float t) { +@@ -684,6 +686,14 @@ HWY_API Mask128 operator>=(co + return Mask128{_mm_cmpge_pd(a.raw, b.raw)}; + } + ++// ------------------------------ FirstN (Iota, Lt) ++ ++template ++HWY_API Mask128 FirstN(const Simd d, size_t num) { ++ const RebindToSigned di; // Signed comparisons are cheaper. ++ return RebindMask(d, Iota(di, 0) < Set(di, static_cast>(num))); ++} ++ + // ================================================== ARITHMETIC + + // ------------------------------ Addition +@@ -895,7 +905,7 @@ template + HWY_API Vec128 Abs(const Vec128 v) { + return Vec128{_mm_abs_epi32(v.raw)}; + } +- ++// i64 is implemented after BroadcastSignBit. + template + HWY_API Vec128 Abs(const Vec128 v) { + const Vec128 mask{_mm_set1_epi32(0x7FFFFFFF)}; +@@ -1067,15 +1077,24 @@ HWY_API Vec128 BroadcastSign + return VecFromMask(v < Zero(Simd())); + #else + // Efficient Gt() requires SSE4.2 but we only have SSE4.1. BLENDVPD requires +- // two constants and domain crossing. 32-bit compare only requires Zero() +- // plus a shuffle to replicate the upper 32 bits. ++ // two constants and domain crossing. 32-bit shift avoids generating a zero. + const Simd d32; +- const auto sign = BitCast(d32, v) < Zero(d32); ++ const auto sign = ShiftRight<31>(BitCast(d32, v)); + return Vec128{ + _mm_shuffle_epi32(sign.raw, _MM_SHUFFLE(3, 3, 1, 1))}; + #endif + } + ++template ++HWY_API Vec128 Abs(const Vec128 v) { ++#if HWY_TARGET == HWY_AVX3 ++ return Vec128{_mm_abs_epi64(v.raw)}; ++#else ++ const auto zero = Zero(Simd()); ++ return IfThenElse(MaskFromVec(BroadcastSignBit(v)), zero - v, v); ++#endif ++} ++ + template + HWY_API Vec128 ShiftRight(const Vec128 v) { + #if HWY_TARGET == HWY_AVX3 +@@ -1787,6 +1806,10 @@ HWY_API void Stream(const Vec128 GatherIndex(Si + + #endif // HWY_TARGET != HWY_SSE4 + ++HWY_DIAGNOSTICS(pop) ++ + // ================================================== SWIZZLE + + // ------------------------------ Extract half +@@ -2075,10 +2100,10 @@ HWY_INLINE Vec128 UpperHalf(V + // ------------------------------ Shift vector by constant #bytes + + // 0x01..0F, kBytes = 1 => 0x02..0F00 +-template +-HWY_API Vec128 ShiftLeftBytes(const Vec128 v) { ++template ++HWY_API Vec128 ShiftLeftBytes(const Vec128 v) { + static_assert(0 <= kBytes && kBytes <= 16, "Invalid kBytes"); +- return Vec128{_mm_slli_si128(v.raw, kBytes)}; ++ return Vec128{_mm_slli_si128(v.raw, kBytes)}; + } + + template +@@ -2089,10 +2114,10 @@ HWY_API Vec128 ShiftLeftLanes(cons + } + + // 0x01..0F, kBytes = 1 => 0x0001..0E +-template +-HWY_API Vec128 ShiftRightBytes(const Vec128 v) { ++template ++HWY_API Vec128 ShiftRightBytes(const Vec128 v) { + static_assert(0 <= kBytes && kBytes <= 16, "Invalid kBytes"); +- return Vec128{_mm_srli_si128(v.raw, kBytes)}; ++ return Vec128{_mm_srli_si128(v.raw, kBytes)}; + } + + template +@@ -2257,44 +2282,47 @@ HWY_API Vec128 Shuffle0123(const + // ------------------------------ TableLookupLanes + + // Returned by SetTableIndices for use by TableLookupLanes. +-template ++template + struct Indices128 { + __m128i raw; + }; + +-template +-HWY_API Indices128 SetTableIndices(Full128, const int32_t* idx) { ++template ++HWY_API Indices128 SetTableIndices(Simd d, const int32_t* idx) { + #if !defined(NDEBUG) || defined(ADDRESS_SANITIZER) +- const size_t N = 16 / sizeof(T); + for (size_t i = 0; i < N; ++i) { + HWY_DASSERT(0 <= idx[i] && idx[i] < static_cast(N)); + } + #endif + +- const Full128 d8; +- alignas(16) uint8_t control[16]; +- for (size_t idx_byte = 0; idx_byte < 16; ++idx_byte) { +- const size_t idx_lane = idx_byte / sizeof(T); +- const size_t mod = idx_byte % sizeof(T); +- control[idx_byte] = static_cast(idx[idx_lane] * sizeof(T) + mod); ++ const Repartition d8; ++ alignas(16) uint8_t control[16] = {0}; ++ for (size_t idx_lane = 0; idx_lane < N; ++idx_lane) { ++ for (size_t idx_byte = 0; idx_byte < sizeof(T); ++idx_byte) { ++ control[idx_lane * sizeof(T) + idx_byte] = ++ static_cast(idx[idx_lane] * sizeof(T) + idx_byte); ++ } + } +- return Indices128{Load(d8, control).raw}; ++ return Indices128{Load(d8, control).raw}; + } + +-HWY_API Vec128 TableLookupLanes(const Vec128 v, +- const Indices128 idx) { +- return TableLookupBytes(v, Vec128{idx.raw}); ++template ++HWY_API Vec128 TableLookupLanes( ++ const Vec128 v, const Indices128 idx) { ++ return TableLookupBytes(v, Vec128{idx.raw}); + } +-HWY_API Vec128 TableLookupLanes(const Vec128 v, +- const Indices128 idx) { +- return TableLookupBytes(v, Vec128{idx.raw}); ++template ++HWY_API Vec128 TableLookupLanes(const Vec128 v, ++ const Indices128 idx) { ++ return TableLookupBytes(v, Vec128{idx.raw}); + } +-HWY_API Vec128 TableLookupLanes(const Vec128 v, +- const Indices128 idx) { +- const Full128 di; +- const Full128 df; ++template ++HWY_API Vec128 TableLookupLanes(const Vec128 v, ++ const Indices128 idx) { ++ const Simd di; ++ const Simd df; + return BitCast(df, +- TableLookupBytes(BitCast(di, v), Vec128{idx.raw})); ++ TableLookupBytes(BitCast(di, v), Vec128{idx.raw})); + } + + // ------------------------------ Interleave lanes +@@ -2502,47 +2530,47 @@ HWY_INLINE Vec128 ConcatUpperLow + + namespace detail { + +-template +-HWY_API Vec128 OddEven(hwy::SizeTag<1> /* tag */, const Vec128 a, +- const Vec128 b) { +- const Full128 d; +- const Full128 d8; ++template ++HWY_API Vec128 OddEven(hwy::SizeTag<1> /* tag */, const Vec128 a, ++ const Vec128 b) { ++ const Simd d; ++ const Repartition d8; + alignas(16) constexpr uint8_t mask[16] = {0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, + 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0}; + return IfThenElse(MaskFromVec(BitCast(d, Load(d8, mask))), b, a); + } +-template +-HWY_API Vec128 OddEven(hwy::SizeTag<2> /* tag */, const Vec128 a, +- const Vec128 b) { +- return Vec128{_mm_blend_epi16(a.raw, b.raw, 0x55)}; ++template ++HWY_API Vec128 OddEven(hwy::SizeTag<2> /* tag */, const Vec128 a, ++ const Vec128 b) { ++ return Vec128{_mm_blend_epi16(a.raw, b.raw, 0x55)}; + } +-template +-HWY_API Vec128 OddEven(hwy::SizeTag<4> /* tag */, const Vec128 a, +- const Vec128 b) { +- return Vec128{_mm_blend_epi16(a.raw, b.raw, 0x33)}; ++template ++HWY_API Vec128 OddEven(hwy::SizeTag<4> /* tag */, const Vec128 a, ++ const Vec128 b) { ++ return Vec128{_mm_blend_epi16(a.raw, b.raw, 0x33)}; + } +-template +-HWY_API Vec128 OddEven(hwy::SizeTag<8> /* tag */, const Vec128 a, +- const Vec128 b) { +- return Vec128{_mm_blend_epi16(a.raw, b.raw, 0x0F)}; ++template ++HWY_API Vec128 OddEven(hwy::SizeTag<8> /* tag */, const Vec128 a, ++ const Vec128 b) { ++ return Vec128{_mm_blend_epi16(a.raw, b.raw, 0x0F)}; + } + + } // namespace detail + +-template +-HWY_API Vec128 OddEven(const Vec128 a, const Vec128 b) { ++template ++HWY_API Vec128 OddEven(const Vec128 a, const Vec128 b) { + return detail::OddEven(hwy::SizeTag(), a, b); + } +-template <> +-HWY_INLINE Vec128 OddEven(const Vec128 a, +- const Vec128 b) { +- return Vec128{_mm_blend_ps(a.raw, b.raw, 5)}; ++template ++HWY_INLINE Vec128 OddEven(const Vec128 a, ++ const Vec128 b) { ++ return Vec128{_mm_blend_ps(a.raw, b.raw, 5)}; + } + +-template <> +-HWY_INLINE Vec128 OddEven(const Vec128 a, +- const Vec128 b) { +- return Vec128{_mm_blend_pd(a.raw, b.raw, 1)}; ++template ++HWY_INLINE Vec128 OddEven(const Vec128 a, ++ const Vec128 b) { ++ return Vec128{_mm_blend_pd(a.raw, b.raw, 1)}; + } + + // ------------------------------ Shl (ZipLower, Mul) +@@ -2980,7 +3008,7 @@ HWY_API Vec128 U8FromU32(con + return LowerHalf(LowerHalf(BitCast(d8, quad))); + } + +-// ------------------------------ Convert integer <=> floating point ++// ------------------------------ Integer <=> fp (ShiftRight, OddEven) + + template + HWY_API Vec128 ConvertTo(Simd /* tag */, +@@ -2995,13 +3023,20 @@ HWY_API Vec128 ConvertTo(Simd + (void)dd; + return Vec128{_mm_cvtepi64_pd(v.raw)}; + #else +- alignas(16) int64_t lanes_i[2]; +- Store(v, Simd(), lanes_i); +- alignas(16) double lanes_d[2]; +- for (size_t i = 0; i < N; ++i) { +- lanes_d[i] = static_cast(lanes_i[i]); +- } +- return Load(dd, lanes_d); ++ // Based on wim's approach (https://stackoverflow.com/questions/41144668/) ++ const Repartition d32; ++ const Repartition d64; ++ ++ // Toggle MSB of lower 32-bits and insert exponent for 2^84 + 2^63 ++ const auto k84_63 = Set(d64, 0x4530000080000000ULL); ++ const auto v_upper = BitCast(dd, ShiftRight<32>(BitCast(d64, v)) ^ k84_63); ++ ++ // Exponent is 2^52, lower 32 bits from v (=> 32-bit OddEven) ++ const auto k52 = Set(d32, 0x43300000); ++ const auto v_lower = BitCast(dd, OddEven(k52, BitCast(d32, v))); ++ ++ const auto k84_63_52 = BitCast(dd, Set(d64, 0x4530000080100000ULL)); ++ return (v_upper - k84_63_52) + v_lower; // order matters! + #endif + } + +@@ -3572,55 +3607,87 @@ HWY_API void StoreInterleaved4(const Vec + + namespace detail { + +-// For u32/i32/f32. +-template +-HWY_API Vec128 SumOfLanes(hwy::SizeTag<4> /* tag */, +- const Vec128 v3210) { ++// N=1 for any T: no-op ++template ++HWY_API Vec128 SumOfLanes(hwy::SizeTag /* tag */, ++ const Vec128 v) { ++ return v; ++} ++template ++HWY_API Vec128 MinOfLanes(hwy::SizeTag /* tag */, ++ const Vec128 v) { ++ return v; ++} ++template ++HWY_API Vec128 MaxOfLanes(hwy::SizeTag /* tag */, ++ const Vec128 v) { ++ return v; ++} ++ ++// u32/i32/f32: ++ ++// N=2 ++template ++HWY_API Vec128 SumOfLanes(hwy::SizeTag<4> /* tag */, ++ const Vec128 v10) { ++ return v10 + Vec128{Shuffle2301(Vec128{v10.raw}).raw}; ++} ++template ++HWY_API Vec128 MinOfLanes(hwy::SizeTag<4> /* tag */, ++ const Vec128 v10) { ++ return Min(v10, Vec128{Shuffle2301(Vec128{v10.raw}).raw}); ++} ++template ++HWY_API Vec128 MaxOfLanes(hwy::SizeTag<4> /* tag */, ++ const Vec128 v10) { ++ return Max(v10, Vec128{Shuffle2301(Vec128{v10.raw}).raw}); ++} ++ ++// N=4 (full) ++template ++HWY_API Vec128 SumOfLanes(hwy::SizeTag<4> /* tag */, const Vec128 v3210) { + const Vec128 v1032 = Shuffle1032(v3210); + const Vec128 v31_20_31_20 = v3210 + v1032; + const Vec128 v20_31_20_31 = Shuffle0321(v31_20_31_20); + return v20_31_20_31 + v31_20_31_20; + } +-template +-HWY_API Vec128 MinOfLanes(hwy::SizeTag<4> /* tag */, +- const Vec128 v3210) { ++template ++HWY_API Vec128 MinOfLanes(hwy::SizeTag<4> /* tag */, const Vec128 v3210) { + const Vec128 v1032 = Shuffle1032(v3210); + const Vec128 v31_20_31_20 = Min(v3210, v1032); + const Vec128 v20_31_20_31 = Shuffle0321(v31_20_31_20); + return Min(v20_31_20_31, v31_20_31_20); + } +-template +-HWY_API Vec128 MaxOfLanes(hwy::SizeTag<4> /* tag */, +- const Vec128 v3210) { ++template ++HWY_API Vec128 MaxOfLanes(hwy::SizeTag<4> /* tag */, const Vec128 v3210) { + const Vec128 v1032 = Shuffle1032(v3210); + const Vec128 v31_20_31_20 = Max(v3210, v1032); + const Vec128 v20_31_20_31 = Shuffle0321(v31_20_31_20); + return Max(v20_31_20_31, v31_20_31_20); + } + +-// For u64/i64/f64. +-template +-HWY_API Vec128 SumOfLanes(hwy::SizeTag<8> /* tag */, +- const Vec128 v10) { ++// u64/i64/f64: ++ ++// N=2 (full) ++template ++HWY_API Vec128 SumOfLanes(hwy::SizeTag<8> /* tag */, const Vec128 v10) { + const Vec128 v01 = Shuffle01(v10); + return v10 + v01; + } +-template +-HWY_API Vec128 MinOfLanes(hwy::SizeTag<8> /* tag */, +- const Vec128 v10) { ++template ++HWY_API Vec128 MinOfLanes(hwy::SizeTag<8> /* tag */, const Vec128 v10) { + const Vec128 v01 = Shuffle01(v10); + return Min(v10, v01); + } +-template +-HWY_API Vec128 MaxOfLanes(hwy::SizeTag<8> /* tag */, +- const Vec128 v10) { ++template ++HWY_API Vec128 MaxOfLanes(hwy::SizeTag<8> /* tag */, const Vec128 v10) { + const Vec128 v01 = Shuffle01(v10); + return Max(v10, v01); + } + + } // namespace detail + +-// Supported for u/i/f 32/64. Returns the sum in each lane. ++// Supported for u/i/f 32/64. Returns the same value in each lane. + template + HWY_API Vec128 SumOfLanes(const Vec128 v) { + return detail::SumOfLanes(hwy::SizeTag(), v); +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/ops/x86_256-inl.h.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/ops/x86_256-inl.h +--- chromium-92.0.4515.107/third_party/highway/src/hwy/ops/x86_256-inl.h.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/ops/x86_256-inl.h 2021-07-26 17:19:30.740403369 -0400 +@@ -20,15 +20,18 @@ + // particular, "Broadcast", pack and zip behavior may be surprising. + + #include // AVX2+ ++ + #if defined(_MSC_VER) && defined(__clang__) + // Including should be enough, but Clang's headers helpfully skip + // including these headers when _MSC_VER is defined, like when using clang-cl. + // Include these directly here. +-#include + #include ++// avxintrin defines __m256i and must come before avx2intrin. + #include ++#include // _pext_u64 + #include + #include ++#include + #endif + + #include +@@ -159,23 +162,24 @@ HWY_API Vec256 Set(Full256{_mm256_set1_epi16(static_cast(t))}; // NOLINT + } + HWY_API Vec256 Set(Full256 /* tag */, const uint32_t t) { +- return Vec256{_mm256_set1_epi32(static_cast(t))}; // NOLINT ++ return Vec256{_mm256_set1_epi32(static_cast(t))}; + } + HWY_API Vec256 Set(Full256 /* tag */, const uint64_t t) { + return Vec256{ + _mm256_set1_epi64x(static_cast(t))}; // NOLINT + } + HWY_API Vec256 Set(Full256 /* tag */, const int8_t t) { +- return Vec256{_mm256_set1_epi8(t)}; ++ return Vec256{_mm256_set1_epi8(static_cast(t))}; // NOLINT + } + HWY_API Vec256 Set(Full256 /* tag */, const int16_t t) { +- return Vec256{_mm256_set1_epi16(t)}; ++ return Vec256{_mm256_set1_epi16(static_cast(t))}; // NOLINT + } + HWY_API Vec256 Set(Full256 /* tag */, const int32_t t) { + return Vec256{_mm256_set1_epi32(t)}; + } + HWY_API Vec256 Set(Full256 /* tag */, const int64_t t) { +- return Vec256{_mm256_set1_epi64x(t)}; ++ return Vec256{ ++ _mm256_set1_epi64x(static_cast(t))}; // NOLINT + } + HWY_API Vec256 Set(Full256 /* tag */, const float t) { + return Vec256{_mm256_set1_ps(t)}; +@@ -351,6 +355,8 @@ HWY_API Vec256 VecFromMask(Full256 + return Vec256{v.raw}; + } + ++// ------------------------------ IfThenElse ++ + // mask ? yes : no + template + HWY_API Vec256 IfThenElse(const Mask256 mask, const Vec256 yes, +@@ -681,6 +687,14 @@ HWY_API Vec256 Max(const Vec256< + return Vec256{_mm256_max_pd(a.raw, b.raw)}; + } + ++// ------------------------------ FirstN (Iota, Lt) ++ ++template ++HWY_API Mask256 FirstN(const Full256 d, size_t n) { ++ const RebindToSigned di; // Signed comparisons are cheaper. ++ return RebindMask(d, Iota(di, 0) < Set(di, static_cast>(n))); ++} ++ + // ================================================== ARITHMETIC + + // ------------------------------ Addition +@@ -843,7 +857,13 @@ HWY_API Vec256 AverageRound(co + + // Returns absolute value, except that LimitsMin() maps to LimitsMax() + 1. + HWY_API Vec256 Abs(const Vec256 v) { ++#if HWY_COMPILER_MSVC ++ // Workaround for incorrect codegen? (wrong result) ++ const auto zero = Zero(Full256()); ++ return Vec256{_mm256_max_epi8(v.raw, (zero - v).raw)}; ++#else + return Vec256{_mm256_abs_epi8(v.raw)}; ++#endif + } + HWY_API Vec256 Abs(const Vec256 v) { + return Vec256{_mm256_abs_epi16(v.raw)}; +@@ -851,6 +871,7 @@ HWY_API Vec256 Abs(const Vec256 + HWY_API Vec256 Abs(const Vec256 v) { + return Vec256{_mm256_abs_epi32(v.raw)}; + } ++// i64 is implemented after BroadcastSignBit. + + HWY_API Vec256 Abs(const Vec256 v) { + const Vec256 mask{_mm256_set1_epi32(0x7FFFFFFF)}; +@@ -1027,6 +1048,15 @@ HWY_API Vec256 ShiftRight(const + #endif + } + ++HWY_API Vec256 Abs(const Vec256 v) { ++#if HWY_TARGET == HWY_AVX3 ++ return Vec256{_mm256_abs_epi64(v.raw)}; ++#else ++ const auto zero = Zero(Full256()); ++ return IfThenElse(MaskFromVec(BroadcastSignBit(v)), zero - v, v); ++#endif ++} ++ + // ------------------------------ ShiftLeftSame + + HWY_API Vec256 ShiftLeftSame(const Vec256 v, +@@ -1398,6 +1428,10 @@ HWY_API void Stream(const Vec256 + + // ------------------------------ Scatter + ++// Work around warnings in the intrinsic definitions (passing -1 as a mask). ++HWY_DIAGNOSTICS(push) ++HWY_DIAGNOSTICS_OFF(disable : 4245 4365, ignored "-Wsign-conversion") ++ + #if HWY_TARGET == HWY_AVX3 + namespace detail { + +@@ -1584,6 +1618,8 @@ HWY_INLINE Vec256 GatherIndex{_mm256_i64gather_pd(base, index.raw, 8)}; + } + ++HWY_DIAGNOSTICS(pop) ++ + // ================================================== SWIZZLE + + template +@@ -2379,11 +2415,18 @@ HWY_API Vec128 DemoteTo(Full128< + _mm256_castsi256_si128(_mm256_permute4x64_epi64(i8, 0x88))}; + } + ++ // Avoid "value of intrinsic immediate argument '8' is out of range '0 - 7'". ++ // 8 is the correct value of _MM_FROUND_NO_EXC, which is allowed here. ++HWY_DIAGNOSTICS(push) ++HWY_DIAGNOSTICS_OFF(disable : 4556, ignored "-Wsign-conversion") ++ + HWY_API Vec128 DemoteTo(Full128 /* tag */, + const Vec256 v) { + return Vec128{_mm256_cvtps_ph(v.raw, _MM_FROUND_NO_EXC)}; + } + ++HWY_DIAGNOSTICS(pop) ++ + HWY_API Vec128 DemoteTo(Full128 /* tag */, + const Vec256 v) { + return Vec128{_mm256_cvtpd_ps(v.raw)}; +@@ -2409,7 +2452,7 @@ HWY_API Vec128 U8FromU32(con + return BitCast(Simd(), pair); + } + +-// ------------------------------ Convert integer <=> floating point ++// ------------------------------ Integer <=> fp (ShiftRight, OddEven) + + HWY_API Vec256 ConvertTo(Full256 /* tag */, + const Vec256 v) { +@@ -2421,13 +2464,20 @@ HWY_API Vec256 ConvertTo(Full256 + (void)dd; + return Vec256{_mm256_cvtepi64_pd(v.raw)}; + #else +- alignas(32) int64_t lanes_i[4]; +- Store(v, Full256(), lanes_i); +- alignas(32) double lanes_d[4]; +- for (size_t i = 0; i < 4; ++i) { +- lanes_d[i] = static_cast(lanes_i[i]); +- } +- return Load(dd, lanes_d); ++ // Based on wim's approach (https://stackoverflow.com/questions/41144668/) ++ const Repartition d32; ++ const Repartition d64; ++ ++ // Toggle MSB of lower 32-bits and insert exponent for 2^84 + 2^63 ++ const auto k84_63 = Set(d64, 0x4530000080000000ULL); ++ const auto v_upper = BitCast(dd, ShiftRight<32>(BitCast(d64, v)) ^ k84_63); ++ ++ // Exponent is 2^52, lower 32 bits from v (=> 32-bit OddEven) ++ const auto k52 = Set(d32, 0x43300000); ++ const auto v_lower = BitCast(dd, OddEven(k52, BitCast(d32, v))); ++ ++ const auto k84_63_52 = BitCast(dd, Set(d64, 0x4530000080100000ULL)); ++ return (v_upper - k84_63_52) + v_lower; // order matters! + #endif + } + +@@ -2502,8 +2552,7 @@ HWY_API uint64_t BitsFromMask(hwy::SizeT + const auto compressed = + _mm256_permute4x64_epi64(sign_bits, _MM_SHUFFLE(3, 1, 2, 0)); + return static_cast(_mm256_movemask_epi8(compressed)); +- +-#endif ++#endif // HWY_ARCH_X86_64 + } + + template +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/targets.cc.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/targets.cc +--- chromium-92.0.4515.107/third_party/highway/src/hwy/targets.cc.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/targets.cc 2021-07-26 17:17:24.610482240 -0400 +@@ -32,8 +32,8 @@ + #include + #else // HWY_COMPILER_MSVC + #include +-#endif // HWY_COMPILER_MSVC +-#endif ++#endif // HWY_COMPILER_MSVC ++#endif // HWY_ARCH_X86 + + namespace hwy { + namespace { +@@ -126,7 +126,7 @@ constexpr uint32_t kAVX512VL = 1u << 13; + constexpr uint32_t kAVX512DQ = 1u << 14; + constexpr uint32_t kAVX512BW = 1u << 15; + constexpr uint32_t kGroupAVX3 = kAVX512F | kAVX512VL | kAVX512DQ | kAVX512BW; +-#endif ++#endif // HWY_ARCH_X86 + + } // namespace + +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/targets.h.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/targets.h +--- chromium-92.0.4515.107/third_party/highway/src/hwy/targets.h.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/targets.h 2021-07-26 17:17:24.610482240 -0400 +@@ -65,7 +65,9 @@ + // HWY_MAX_DYNAMIC_TARGETS in total. + #define HWY_HIGHEST_TARGET_BIT_X86 9 + +-// 0x400, 0x800, 0x1000 reserved for SVE, SVE2, Helium ++#define HWY_SVE2 0x400 ++#define HWY_SVE 0x800 ++// 0x1000 reserved for Helium + #define HWY_NEON 0x2000 + + #define HWY_HIGHEST_TARGET_BIT_ARM 13 +@@ -90,6 +92,9 @@ + // 0x2000000, 0x4000000, 0x8000000, 0x10000000 reserved + + #define HWY_SCALAR 0x20000000 ++ ++#define HWY_HIGHEST_TARGET_BIT_SCALAR 29 ++ + // Cannot use higher values, otherwise HWY_TARGETS computation might overflow. + + //------------------------------------------------------------------------------ +@@ -106,25 +111,26 @@ + #ifndef HWY_BROKEN_TARGETS + + // x86 clang-6: we saw multiple AVX2/3 compile errors and in one case invalid +-// SSE4 codegen (msan failure), so disable all those targets. ++// SSE4 codegen (possibly only for msan), so disable all those targets. + #if HWY_ARCH_X86 && (HWY_COMPILER_CLANG != 0 && HWY_COMPILER_CLANG < 700) +-// TODO: Disable all non-scalar targets for every build target once we have +-// clang-7 enabled in our builders. +-#ifdef MEMORY_SANITIZER + #define HWY_BROKEN_TARGETS (HWY_SSE4 | HWY_AVX2 | HWY_AVX3) +-#else +-#define HWY_BROKEN_TARGETS 0 +-#endif + // This entails a major speed reduction, so warn unless the user explicitly + // opts in to scalar-only. + #if !defined(HWY_COMPILE_ONLY_SCALAR) + #pragma message("x86 Clang <= 6: define HWY_COMPILE_ONLY_SCALAR or upgrade.") + #endif + +-// MSVC, or 32-bit may fail to compile AVX2/3. +-#elif HWY_COMPILER_MSVC != 0 || HWY_ARCH_X86_32 ++// 32-bit may fail to compile AVX2/3. ++#elif HWY_ARCH_X86_32 + #define HWY_BROKEN_TARGETS (HWY_AVX2 | HWY_AVX3) +-#pragma message("Disabling AVX2/3 due to known issues with MSVC/32-bit builds") ++ ++// MSVC AVX3 support is buggy: https://github.com/Mysticial/Flops/issues/16 ++#elif HWY_COMPILER_MSVC != 0 ++#define HWY_BROKEN_TARGETS (HWY_AVX3) ++ ++// armv7be has not been tested and is not yet supported. ++#elif HWY_ARCH_ARM_V7 && (defined(__ARM_BIG_ENDIAN) || defined(__BIG_ENDIAN)) ++#define HWY_BROKEN_TARGETS (HWY_NEON) + + #else + #define HWY_BROKEN_TARGETS 0 +@@ -145,53 +151,74 @@ + // user to override this without any guarantee of success. + #ifndef HWY_BASELINE_TARGETS + +-#ifdef __wasm_simd128__ ++// Also check HWY_ARCH to ensure that simulating unknown platforms ends up with ++// HWY_TARGET == HWY_SCALAR. ++ ++#if HWY_ARCH_WASM && defined(__wasm_simd128__) + #define HWY_BASELINE_WASM HWY_WASM + #else + #define HWY_BASELINE_WASM 0 + #endif + +-#ifdef __VSX__ ++// Avoid choosing the PPC target until we have an implementation. ++#if HWY_ARCH_PPC && defined(__VSX__) && 0 + #define HWY_BASELINE_PPC8 HWY_PPC8 + #else + #define HWY_BASELINE_PPC8 0 + #endif + +-// GCC 4.5.4 only defines the former; 5.4 defines both. +-#if defined(__ARM_NEON__) || defined(__ARM_NEON) ++// Avoid choosing the SVE[2] targets the implementation is ready. ++#if HWY_ARCH_ARM && defined(__ARM_FEATURE_SVE2) && 0 ++#define HWY_BASELINE_SVE2 HWY_SVE2 ++#else ++#define HWY_BASELINE_SVE2 0 ++#endif ++ ++#if HWY_ARCH_ARM && defined(__ARM_FEATURE_SVE) && 0 ++#define HWY_BASELINE_SVE HWY_SVE ++#else ++#define HWY_BASELINE_SVE 0 ++#endif ++ ++// GCC 4.5.4 only defines __ARM_NEON__; 5.4 defines both. ++#if HWY_ARCH_ARM && (defined(__ARM_NEON__) || defined(__ARM_NEON)) + #define HWY_BASELINE_NEON HWY_NEON + #else + #define HWY_BASELINE_NEON 0 + #endif + +-#ifdef __SSE4_1__ ++// MSVC does not set SSE4_1, but it does set AVX; checking for the latter means ++// we at least get SSE4 on machines supporting AVX but not AVX2. ++// https://stackoverflow.com/questions/18563978/ ++#if HWY_ARCH_X86 && \ ++ (defined(__SSE4_1__) || (HWY_COMPILER_MSVC != 0 && defined(__AVX__))) + #define HWY_BASELINE_SSE4 HWY_SSE4 + #else + #define HWY_BASELINE_SSE4 0 + #endif + +-#ifdef __AVX2__ ++#if HWY_ARCH_X86 && defined(__AVX2__) + #define HWY_BASELINE_AVX2 HWY_AVX2 + #else + #define HWY_BASELINE_AVX2 0 + #endif + +-#ifdef __AVX512F__ ++#if HWY_ARCH_X86 && defined(__AVX512F__) + #define HWY_BASELINE_AVX3 HWY_AVX3 + #else + #define HWY_BASELINE_AVX3 0 + #endif + +-#ifdef __riscv_vector ++#if HWY_ARCH_RVV && defined(__riscv_vector) + #define HWY_BASELINE_RVV HWY_RVV + #else + #define HWY_BASELINE_RVV 0 + #endif + + #define HWY_BASELINE_TARGETS \ +- (HWY_SCALAR | HWY_BASELINE_WASM | HWY_BASELINE_PPC8 | HWY_BASELINE_NEON | \ +- HWY_BASELINE_SSE4 | HWY_BASELINE_AVX2 | HWY_BASELINE_AVX3 | \ +- HWY_BASELINE_RVV) ++ (HWY_SCALAR | HWY_BASELINE_WASM | HWY_BASELINE_PPC8 | HWY_BASELINE_SVE2 | \ ++ HWY_BASELINE_SVE | HWY_BASELINE_NEON | HWY_BASELINE_SSE4 | \ ++ HWY_BASELINE_AVX2 | HWY_BASELINE_AVX3 | HWY_BASELINE_RVV) + + #endif // HWY_BASELINE_TARGETS + +@@ -242,13 +269,12 @@ + #define HWY_TARGETS HWY_STATIC_TARGET + + // 3) For tests: include all attainable targets (in particular: scalar) +-#elif defined(HWY_COMPILE_ALL_ATTAINABLE) ++#elif defined(HWY_COMPILE_ALL_ATTAINABLE) || defined(HWY_IS_TEST) + #define HWY_TARGETS HWY_ATTAINABLE_TARGETS + + // 4) Default: attainable WITHOUT non-best baseline. This reduces code size by + // excluding superseded targets, in particular scalar. + #else +- + #define HWY_TARGETS (HWY_ATTAINABLE_TARGETS & (2 * HWY_STATIC_TARGET - 1)) + + #endif // target policy +@@ -323,6 +349,10 @@ static inline HWY_MAYBE_UNUSED const cha + #endif + + #if HWY_ARCH_ARM ++ case HWY_SVE2: ++ return "SVE2"; ++ case HWY_SVE: ++ return "SVE"; + case HWY_NEON: + return "Neon"; + #endif +@@ -346,7 +376,7 @@ static inline HWY_MAYBE_UNUSED const cha + return "Scalar"; + + default: +- return "?"; ++ return "Unknown"; // must satisfy gtest IsValidParamName() + } + } + +@@ -405,21 +435,17 @@ static inline HWY_MAYBE_UNUSED const cha + nullptr, /* SSE3 */ \ + nullptr /* SSE2 */ + +-#endif // HWY_ARCH_X86 +- +-#if HWY_ARCH_ARM ++#elif HWY_ARCH_ARM + // See HWY_ARCH_X86 above for details. + #define HWY_MAX_DYNAMIC_TARGETS 4 + #define HWY_HIGHEST_TARGET_BIT HWY_HIGHEST_TARGET_BIT_ARM + #define HWY_CHOOSE_TARGET_LIST(func_name) \ +- nullptr, /* reserved */ \ +- nullptr, /* reserved */ \ ++ HWY_CHOOSE_SVE2(func_name), /* SVE2 */ \ ++ HWY_CHOOSE_SVE(func_name), /* SVE */ \ + nullptr, /* reserved */ \ + HWY_CHOOSE_NEON(func_name) /* NEON */ + +-#endif // HWY_ARCH_ARM +- +-#if HWY_ARCH_PPC ++#elif HWY_ARCH_PPC + // See HWY_ARCH_X86 above for details. + #define HWY_MAX_DYNAMIC_TARGETS 5 + #define HWY_HIGHEST_TARGET_BIT HWY_HIGHEST_TARGET_BIT_PPC +@@ -430,9 +456,7 @@ static inline HWY_MAYBE_UNUSED const cha + nullptr, /* VSX */ \ + nullptr /* AltiVec */ + +-#endif // HWY_ARCH_PPC +- +-#if HWY_ARCH_WASM ++#elif HWY_ARCH_WASM + // See HWY_ARCH_X86 above for details. + #define HWY_MAX_DYNAMIC_TARGETS 4 + #define HWY_HIGHEST_TARGET_BIT HWY_HIGHEST_TARGET_BIT_WASM +@@ -442,9 +466,7 @@ static inline HWY_MAYBE_UNUSED const cha + nullptr, /* reserved */ \ + HWY_CHOOSE_WASM(func_name) /* WASM */ + +-#endif // HWY_ARCH_WASM +- +-#if HWY_ARCH_RVV ++#elif HWY_ARCH_RVV + // See HWY_ARCH_X86 above for details. + #define HWY_MAX_DYNAMIC_TARGETS 4 + #define HWY_HIGHEST_TARGET_BIT HWY_HIGHEST_TARGET_BIT_RVV +@@ -454,7 +476,12 @@ static inline HWY_MAYBE_UNUSED const cha + nullptr, /* reserved */ \ + HWY_CHOOSE_RVV(func_name) /* RVV */ + +-#endif // HWY_ARCH_RVV ++#else ++// Unknown architecture, will use HWY_SCALAR without dynamic dispatch, though ++// still creating single-entry tables in HWY_EXPORT to ensure portability. ++#define HWY_MAX_DYNAMIC_TARGETS 1 ++#define HWY_HIGHEST_TARGET_BIT HWY_HIGHEST_TARGET_BIT_SCALAR ++#endif + + struct ChosenTarget { + public: +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/tests/memory_test.cc.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/tests/memory_test.cc +--- chromium-92.0.4515.107/third_party/highway/src/hwy/tests/memory_test.cc.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/tests/memory_test.cc 2021-07-26 17:10:40.022319820 -0400 +@@ -12,6 +12,12 @@ + // See the License for the specific language governing permissions and + // limitations under the License. + ++// Ensure incompabilities with Windows macros (e.g. #define StoreFence) are ++// detected. Must come before Highway headers. ++#if defined(_WIN32) || defined(_WIN64) ++#include ++#endif ++ + #include + #include + +@@ -199,13 +205,14 @@ struct TestLoadDup128 { + for (size_t i = 0; i < N128; ++i) { + lanes[i] = static_cast(1 + i); + } +- const auto v = LoadDup128(d, lanes); ++ + const size_t N = Lanes(d); +- auto out = AllocateAligned(N); +- Store(v, d, out.get()); ++ auto expected = AllocateAligned(N); + for (size_t i = 0; i < N; ++i) { +- HWY_ASSERT_EQ(T(i % N128 + 1), out[i]); ++ expected[i] = static_cast(i % N128 + 1); + } ++ ++ HWY_ASSERT_VEC_EQ(d, expected.get(), LoadDup128(d, lanes)); + #else + (void)d; + #endif +@@ -327,6 +334,84 @@ HWY_NOINLINE void TestAllScatter() { + ForFloatTypes(test); + } + ++// Assumes little-endian byte order! ++struct TestScatter { ++ template ++ HWY_NOINLINE void operator()(T /*unused*/, D d) { ++ using Offset = MakeSigned; ++ ++ const size_t N = Lanes(d); ++ const size_t range = 4 * N; // number of items to scatter ++ const size_t max_bytes = range * sizeof(T); // upper bound on offset ++ ++ RandomState rng; ++ ++ // Data to be scattered ++ auto bytes = AllocateAligned(max_bytes); ++ for (size_t i = 0; i < max_bytes; ++i) { ++ bytes[i] = static_cast(Random32(&rng) & 0xFF); ++ } ++ const auto data = Load(d, reinterpret_cast(bytes.get())); ++ ++ // Scatter into these regions, ensure vector results match scalar ++ auto expected = AllocateAligned(range); ++ auto actual = AllocateAligned(range); ++ ++ const Rebind d_offsets; ++ auto offsets = AllocateAligned(N); // or indices ++ ++ for (size_t rep = 0; rep < 100; ++rep) { ++ // Byte offsets ++ std::fill(expected.get(), expected.get() + range, T(0)); ++ std::fill(actual.get(), actual.get() + range, T(0)); ++ for (size_t i = 0; i < N; ++i) { ++ offsets[i] = ++ static_cast(Random32(&rng) % (max_bytes - sizeof(T))); ++ CopyBytes( ++ bytes.get() + i * sizeof(T), ++ reinterpret_cast(expected.get()) + offsets[i]); ++ } ++ const auto voffsets = Load(d_offsets, offsets.get()); ++ ScatterOffset(data, d, actual.get(), voffsets); ++ if (!BytesEqual(expected.get(), actual.get(), max_bytes)) { ++ Print(d, "Data", data); ++ Print(d_offsets, "Offsets", voffsets); ++ HWY_ASSERT(false); ++ } ++ ++ // Indices ++ std::fill(expected.get(), expected.get() + range, T(0)); ++ std::fill(actual.get(), actual.get() + range, T(0)); ++ for (size_t i = 0; i < N; ++i) { ++ offsets[i] = static_cast(Random32(&rng) % range); ++ CopyBytes(bytes.get() + i * sizeof(T), ++ &expected[offsets[i]]); ++ } ++ const auto vindices = Load(d_offsets, offsets.get()); ++ ScatterIndex(data, d, actual.get(), vindices); ++ if (!BytesEqual(expected.get(), actual.get(), max_bytes)) { ++ Print(d, "Data", data); ++ Print(d_offsets, "Indices", vindices); ++ HWY_ASSERT(false); ++ } ++ } ++ } ++}; ++ ++HWY_NOINLINE void TestAllScatter() { ++ // No u8,u16,i8,i16. ++ const ForPartialVectors test; ++ test(uint32_t()); ++ test(int32_t()); ++ ++#if HWY_CAP_INTEGER64 ++ test(uint64_t()); ++ test(int64_t()); ++#endif ++ ++ ForFloatTypes(test); ++} ++ + struct TestGather { + template + HWY_NOINLINE void operator()(T /*unused*/, D d) { +@@ -391,6 +476,7 @@ HWY_NOINLINE void TestAllCache() { + int test = 0; + Prefetch(&test); + FlushCacheline(&test); ++ Pause(); + } + + // NOLINTNEXTLINE(google-readability-namespace-comments) +diff -up chromium-92.0.4515.107/third_party/highway/src/hwy/tests/swizzle_test.cc.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/hwy/tests/swizzle_test.cc +--- chromium-92.0.4515.107/third_party/highway/src/hwy/tests/swizzle_test.cc.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/hwy/tests/swizzle_test.cc 2021-07-26 17:10:40.023319835 -0400 +@@ -223,6 +223,7 @@ struct TestTableLookupBytes { + HWY_NOINLINE void TestAllTableLookupBytes() { + ForIntegerTypes(ForPartialVectors()); + } ++ + struct TestTableLookupLanes { + #if HWY_TARGET == HWY_RVV + using Index = uint32_t; +@@ -242,12 +243,13 @@ struct TestTableLookupLanes { + if (N <= 8) { // Test all permutations + for (size_t i0 = 0; i0 < N; ++i0) { + idx[0] = static_cast(i0); ++ + for (size_t i1 = 0; i1 < N; ++i1) { +- idx[1] = static_cast(i1); ++ if (N >= 2) idx[1] = static_cast(i1); + for (size_t i2 = 0; i2 < N; ++i2) { +- idx[2] = static_cast(i2); ++ if (N >= 4) idx[2] = static_cast(i2); + for (size_t i3 = 0; i3 < N; ++i3) { +- idx[3] = static_cast(i3); ++ if (N >= 4) idx[3] = static_cast(i3); + + for (size_t i = 0; i < N; ++i) { + expected[i] = static_cast(idx[i] + 1); // == v[idx[i]] +@@ -286,7 +288,7 @@ struct TestTableLookupLanes { + }; + + HWY_NOINLINE void TestAllTableLookupLanes() { +- const ForFullVectors test; ++ const ForPartialVectors test; + test(uint32_t()); + test(int32_t()); + test(float()); +diff -up chromium-92.0.4515.107/third_party/highway/src/README.md.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/README.md +--- chromium-92.0.4515.107/third_party/highway/src/README.md.update-highway-0.12.2 2021-07-26 17:10:40.838332249 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/README.md 2021-07-26 17:15:00.832292309 -0400 +@@ -15,7 +15,7 @@ applying the same operation to 'lanes'. + ## Current status + + Supported targets: scalar, SSE4, AVX2, AVX-512, NEON (ARMv7 and v8), WASM SIMD. +-A port to RVV is in progress. ++Ports to RVV and SVE/SVE2 are in progress. + + Version 0.11 is considered stable enough to use in other projects, and is + expected to remain backwards compatible unless serious issues are discovered +@@ -23,8 +23,11 @@ while implementing SVE/RVV targets. Afte + reach version 1.0. + + Continuous integration tests build with a recent version of Clang (running on +-x86 and QEMU for ARM) and MSVC from VS2015 (running on x86). Also periodically +-tested on x86 with Clang 7-11 and GCC 8, 9 and 10.2.1. ++x86 and QEMU for ARM) and MSVC from VS2015 (running on x86). ++ ++Before releases, we also test on x86 with Clang and GCC, and ARMv7/8 via ++GCC cross-compile and QEMU. See the ++[testing process](g3doc/release_testing_process.md) for details. + + The `contrib` directory contains SIMD-related utilities: an image class with + aligned rows, and a math library (16 functions already implemented, mostly +@@ -63,6 +66,8 @@ To test on all the attainable targets fo + default configuration skips baseline targets (e.g. scalar) that are superseded + by another baseline target. + ++Bazel is also supported for building, but it is not as widely used/tested. ++ + ## Quick start + + You can use the `benchmark` inside examples/ as a starting point. +diff -up chromium-92.0.4515.107/third_party/highway/src/run_tests.bat.update-highway-0.12.2 chromium-92.0.4515.107/third_party/highway/src/run_tests.bat +--- chromium-92.0.4515.107/third_party/highway/src/run_tests.bat.update-highway-0.12.2 2021-07-19 14:47:23.000000000 -0400 ++++ chromium-92.0.4515.107/third_party/highway/src/run_tests.bat 2021-07-26 17:14:47.466088723 -0400 +@@ -2,9 +2,9 @@ + REM Switch directory of this batch file + cd %~dp0 + +-if not exist build mkdir build ++if not exist build_win mkdir build_win + +-cd build ++cd build_win + cmake .. -G Ninja || goto error + ninja || goto error + ctest -j || goto error diff --git a/chromium-92.0.4515.107-widevine-other-locations.patch b/chromium-92.0.4515.107-widevine-other-locations.patch new file mode 100644 index 00000000..739778d7 --- /dev/null +++ b/chromium-92.0.4515.107-widevine-other-locations.patch @@ -0,0 +1,20 @@ +diff -up chromium-92.0.4515.107/chrome/common/chrome_paths.cc.widevine-other-locations chromium-92.0.4515.107/chrome/common/chrome_paths.cc +--- chromium-92.0.4515.107/chrome/common/chrome_paths.cc.widevine-other-locations 2021-07-26 16:50:41.815065696 -0400 ++++ chromium-92.0.4515.107/chrome/common/chrome_paths.cc 2021-07-26 16:58:08.334868284 -0400 +@@ -313,6 +313,16 @@ bool PathProvider(int key, base::FilePat + + #if BUILDFLAG(ENABLE_WIDEVINE) + case chrome::DIR_BUNDLED_WIDEVINE_CDM: ++ base::PathService::Get(base::DIR_HOME, &cur); ++ cur = cur.Append(FILE_PATH_LITERAL(".local/lib/libwidevinecdm.so")); ++ if (base::PathExists(cur)) { ++ break; ++ } ++ // Yes, this has an arch hardcoded in the path, but at this time, it is the only place to find libwidevinecdm.so ++ if (base::PathExists(base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so")))) { ++ cur = base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so")); ++ break; ++ } + if (!GetComponentDirectory(&cur)) + return false; + #if !BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/chromium-93-BluetoothLowEnergyScanFilter-include.patch b/chromium-93-BluetoothLowEnergyScanFilter-include.patch new file mode 100644 index 00000000..aa1c0334 --- /dev/null +++ b/chromium-93-BluetoothLowEnergyScanFilter-include.patch @@ -0,0 +1,30 @@ +From 2f5514051210388bfcff605570d33f08cfa7bcaa Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz +Date: Wed, 21 Jul 2021 08:34:58 +0000 +Subject: [PATCH] IWYU: usage of unique_ptr requires including in bluetooth low energy scan filter. + +Fix build because of missing include: +../../device/bluetooth/bluetooth_low_energy_scan_filter.h:57:15: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type + 57 | static std::unique_ptr Create( + | ^~~~~~~~~~ + +Bug: 819294 +Change-Id: I347953a083f1bcdf744fd86e1a73954c6f86b32e +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3041155 +Reviewed-by: Reilly Grant +Commit-Queue: José Dapena Paz +Cr-Commit-Position: refs/heads/master@{#903819} +--- + +diff --git a/device/bluetooth/bluetooth_low_energy_scan_filter.h b/device/bluetooth/bluetooth_low_energy_scan_filter.h +index a0436c1..7ae606c 100644 +--- a/device/bluetooth/bluetooth_low_energy_scan_filter.h ++++ b/device/bluetooth/bluetooth_low_energy_scan_filter.h +@@ -7,6 +7,7 @@ + + #include + #include ++#include + #include + + #include "base/time/time.h" diff --git a/chromium-93-ClassProperty-include.patch b/chromium-93-ClassProperty-include.patch new file mode 100644 index 00000000..b5f81b45 --- /dev/null +++ b/chromium-93-ClassProperty-include.patch @@ -0,0 +1,30 @@ +From 8ae99ee447cf5f0160ea4ae978cdf37f5dcecd1e Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz +Date: Wed, 21 Jul 2021 08:36:20 +0000 +Subject: [PATCH] IWYU: missing memory include for unique_ptr usage in class_property.h + +Fix GCC build breakage because of missing inclide: +./../ui/base/class_property.h:120:58: error: ‘std::unique_ptr’ has not been declared + 120 | T* SetProperty(const ClassProperty* property, std::unique_ptr value); + | ^~~~~~~~~~ + +Bug: 819294 +Change-Id: I46b921876702b8d44674689bbb5acdc107db21e5 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3041030 +Reviewed-by: Peter Boström +Commit-Queue: José Dapena Paz +Cr-Commit-Position: refs/heads/master@{#903820} +--- + +diff --git a/ui/base/class_property.h b/ui/base/class_property.h +index f7b2f55..88b4938 100644 +--- a/ui/base/class_property.h ++++ b/ui/base/class_property.h +@@ -8,6 +8,7 @@ + #include + + #include ++#include + #include + #include + diff --git a/chromium-93-ContextSet-permissive.patch b/chromium-93-ContextSet-permissive.patch new file mode 100644 index 00000000..46065041 --- /dev/null +++ b/chromium-93-ContextSet-permissive.patch @@ -0,0 +1,47 @@ +From 7108f83c8ad1bad4072e4f32da3db6d59cf51400 Mon Sep 17 00:00:00 2001 +From: Ivan Murashov +Date: Tue, 20 Jul 2021 13:16:44 +0300 +Subject: [PATCH] GCC: Remove double declaration of ContextSet + +After the CL +https://chromium-review.googlesource.com/c/angle/angle/+/2965780 +the build with GCC failed with error: +/third_party/angle/src/libANGLE/Display.h:325:37: error: declaration of +'typedef class std::__1::set egl::Display::ContextSet' +changes meaning of 'ContextSet' [-fpermissive] +/third_party/angle/src/libANGLE/Display.h:75:7: note: 'ContextSet' +declared here as 'using ContextSet = class std::__1::set' + +To fix the error the double declaration of ContextSet is removed. + +Bug: angleproject:5878, chromium:819294 +Change-Id: Id9e52061af53ea18dd5d13b960daaa67a14f61ca +Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3038804 +Reviewed-by: Jamie Madill +Commit-Queue: Jamie Madill +--- + +diff --git a/third_party/angle/CONTRIBUTORS b/third_party/angle/CONTRIBUTORS +index 887ddc2..94b1b4d 100644 +--- a/third_party/angle/CONTRIBUTORS ++++ b/third_party/angle/CONTRIBUTORS +@@ -154,6 +154,7 @@ + + LG Electronics, Inc. + Jani Hautakangas ++ Ivan Murashov + + IBM Inc. + Junliang Yan +diff --git a/third_party/angle/src/libANGLE/Display.h b/third_party/angle/src/libANGLE/Display.h +index f33123b..f0c0910 100644 +--- a/third_party/angle/src/libANGLE/Display.h ++++ b/third_party/angle/src/libANGLE/Display.h +@@ -322,7 +322,6 @@ + + ConfigSet mConfigSet; + +- typedef std::set ContextSet; + ContextSet mContextSet; + + typedef std::set ImageSet; diff --git a/chromium-93-DevToolsEmbedderMessageDispatcher-include.patch b/chromium-93-DevToolsEmbedderMessageDispatcher-include.patch new file mode 100644 index 00000000..dae81c02 --- /dev/null +++ b/chromium-93-DevToolsEmbedderMessageDispatcher-include.patch @@ -0,0 +1,24 @@ +From 409859ad9ba763a4267fb3457df7cd8eb0b7387b Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Sun, 25 Jul 2021 19:43:45 +0000 +Subject: [PATCH] IWYU: add vector for std::vector + +--- + chrome/browser/devtools/devtools_embedder_message_dispatcher.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/chrome/browser/devtools/devtools_embedder_message_dispatcher.h b/chrome/browser/devtools/devtools_embedder_message_dispatcher.h +index 12f8500..4007112 100644 +--- a/chrome/browser/devtools/devtools_embedder_message_dispatcher.h ++++ b/chrome/browser/devtools/devtools_embedder_message_dispatcher.h +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + #include "base/callback.h" + #include "ui/gfx/geometry/insets.h" +-- +2.31.1 + diff --git a/chromium-93-FormForest-constexpr.patch b/chromium-93-FormForest-constexpr.patch new file mode 100644 index 00000000..56f7492e --- /dev/null +++ b/chromium-93-FormForest-constexpr.patch @@ -0,0 +1,49 @@ +From 802150d7be94e5317b257df545d55ce5b007ae65 Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz +Date: Tue, 20 Jul 2021 18:50:11 +0000 +Subject: [PATCH] libstdc++: do not use unique_ptr bool() operator in a constexpr in form_forest.h + +Fix build breakage in GCC, because of calling non constexpr functions from a +constexpr function. In this case, libstdc++ unique_ptr bool() operator is not +constexpr, so it cannot be used inside CompareByFrameToken. + +An example of build breakage caused by this: + ../../components/autofill/content/browser/form_forest.h:157:21: error: call to non-‘constexpr’ function ‘std::unique_ptr<_Tp, _Dp>::operator bool() const [with _Tp = autofill::internal::FormForest::FrameData; _Dp = std::default_delete]’ + 157 | return f && g ? f->frame_token < g->frame_token : f.get() < g.get(); + | ^ + +Bug: 957519 +Change-Id: I3c49559084fe58886a03520729873b7c4ac89bbf +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3041050 +Commit-Queue: Dominic Battré +Reviewed-by: Dominic Battré +Cr-Commit-Position: refs/heads/master@{#903595} +--- + +diff --git a/components/autofill/content/browser/form_forest.h b/components/autofill/content/browser/form_forest.h +index c89a8eb..f414ab8 100644 +--- a/components/autofill/content/browser/form_forest.h ++++ b/components/autofill/content/browser/form_forest.h +@@ -152,16 +152,16 @@ + // used by FrameData sets. + struct CompareByFrameToken { + using is_transparent = void; +- constexpr bool operator()(const std::unique_ptr& f, +- const std::unique_ptr& g) const { ++ bool operator()(const std::unique_ptr& f, ++ const std::unique_ptr& g) const { + return f && g ? f->frame_token < g->frame_token : f.get() < g.get(); + } +- constexpr bool operator()(const std::unique_ptr& f, +- const LocalFrameToken& g) const { ++ bool operator()(const std::unique_ptr& f, ++ const LocalFrameToken& g) const { + return f ? f->frame_token < g : true; + } +- constexpr bool operator()(const LocalFrameToken& f, +- const std::unique_ptr& g) const { ++ bool operator()(const LocalFrameToken& f, ++ const std::unique_ptr& g) const { + return g ? f < g->frame_token : false; + } + }; diff --git a/chromium-93-HashPasswordManager-include.patch b/chromium-93-HashPasswordManager-include.patch new file mode 100644 index 00000000..7e9f3869 --- /dev/null +++ b/chromium-93-HashPasswordManager-include.patch @@ -0,0 +1,30 @@ +From 17d0e3dfcd0690df0e7b212fedcb95402f16935d Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz +Date: Fri, 23 Jul 2021 10:17:49 +0000 +Subject: [PATCH] IWYU: missing include for using std::vector in hash password manager. + +Fix build breakage: +../../components/password_manager/core/browser/hash_password_manager.h:44:8: error: ‘vector’ in namespace ‘std’ does not name a template type + 44 | std::vector RetrieveAllPasswordHashes(); + | ^~~~~~ + +Bug: 819294 +Change-Id: I8c8a4ec3972eedb87a312c5ec56adf4a21b1b2a2 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3041046 +Commit-Queue: Vasilii Sukhanov +Reviewed-by: Vasilii Sukhanov +Cr-Commit-Position: refs/heads/master@{#904696} +--- + +diff --git a/components/password_manager/core/browser/hash_password_manager.h b/components/password_manager/core/browser/hash_password_manager.h +index c762c5a..85e656ed 100644 +--- a/components/password_manager/core/browser/hash_password_manager.h ++++ b/components/password_manager/core/browser/hash_password_manager.h +@@ -6,6 +6,7 @@ + #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_HASH_PASSWORD_MANAGER_H_ + + #include ++#include + + #include "base/callback.h" + #include "base/callback_list.h" diff --git a/chromium-93-ScopedTestDialogAutoConfirm-include.patch b/chromium-93-ScopedTestDialogAutoConfirm-include.patch new file mode 100644 index 00000000..1ff06734 --- /dev/null +++ b/chromium-93-ScopedTestDialogAutoConfirm-include.patch @@ -0,0 +1,24 @@ +From 92fc089d50fc81b9903cd0573c95749e41081474 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Sun, 25 Jul 2021 21:38:26 +0000 +Subject: [PATCH] IWYU: add cstring for std::strcpy + +--- + extensions/browser/extension_dialog_auto_confirm.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/extensions/browser/extension_dialog_auto_confirm.cc b/extensions/browser/extension_dialog_auto_confirm.cc +index adb4ac3..be8b161 100644 +--- a/extensions/browser/extension_dialog_auto_confirm.cc ++++ b/extensions/browser/extension_dialog_auto_confirm.cc +@@ -4,6 +4,7 @@ + + #include "extensions/browser/extension_dialog_auto_confirm.h" + ++#include + #include + + #include "base/check.h" +-- +2.31.1 + diff --git a/chromium-93-pdfium-include.patch b/chromium-93-pdfium-include.patch new file mode 100644 index 00000000..72f2abd3 --- /dev/null +++ b/chromium-93-pdfium-include.patch @@ -0,0 +1,117 @@ +From 7a6289c5ace52cf88f0e19caa5f78b7c15d0e7a6 Mon Sep 17 00:00:00 2001 +From: Miklos Vajna +Date: Wed, 21 Jul 2021 17:42:30 +0000 +Subject: [PATCH] fxcodec, fxge: fix missing includes with libstdc++ + +These missing includes break the build with gcc/libstdc++, they were not +a problem in practice with clang/libc++. + +Change-Id: I40013f97ba7ab06f32aa59f87b04aec06a19478c +Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/83210 +Commit-Queue: Lei Zhang +Reviewed-by: Lei Zhang +--- + +diff --git a/third_party/pdfium/core/fxcodec/jpeg/jpegmodule.cpp b/third_party/pdfium/core/fxcodec/jpeg/jpegmodule.cpp +index cea0679..036f250 100644 +--- a/third_party/pdfium/core/fxcodec/jpeg/jpegmodule.cpp ++++ b/third_party/pdfium/core/fxcodec/jpeg/jpegmodule.cpp +@@ -7,6 +7,7 @@ + #include "core/fxcodec/jpeg/jpegmodule.h" + + #include ++#include + + #include + #include +diff --git a/third_party/pdfium/core/fxcodec/jpx/cjpx_decoder.cpp b/third_party/pdfium/core/fxcodec/jpx/cjpx_decoder.cpp +index c66985a..9c1122b 100644 +--- a/third_party/pdfium/core/fxcodec/jpx/cjpx_decoder.cpp ++++ b/third_party/pdfium/core/fxcodec/jpx/cjpx_decoder.cpp +@@ -6,6 +6,8 @@ + + #include "core/fxcodec/jpx/cjpx_decoder.h" + ++#include ++ + #include + #include + #include +diff --git a/third_party/pdfium/core/fxge/cfx_cliprgn.cpp b/third_party/pdfium/core/fxge/cfx_cliprgn.cpp +index 5369d52..d198852 100644 +--- a/third_party/pdfium/core/fxge/cfx_cliprgn.cpp ++++ b/third_party/pdfium/core/fxge/cfx_cliprgn.cpp +@@ -6,6 +6,8 @@ + + #include "core/fxge/cfx_cliprgn.h" + ++#include ++ + #include + + #include "core/fxge/dib/cfx_dibitmap.h" +diff --git a/third_party/pdfium/core/fxge/dib/cfx_bitmapcomposer.cpp b/third_party/pdfium/core/fxge/dib/cfx_bitmapcomposer.cpp +index 6f9b420..0f1ffae 100644 +--- a/third_party/pdfium/core/fxge/dib/cfx_bitmapcomposer.cpp ++++ b/third_party/pdfium/core/fxge/dib/cfx_bitmapcomposer.cpp +@@ -6,6 +6,8 @@ + + #include "core/fxge/dib/cfx_bitmapcomposer.h" + ++#include ++ + #include "core/fxge/cfx_cliprgn.h" + #include "core/fxge/dib/cfx_dibitmap.h" + +diff --git a/third_party/pdfium/core/fxge/dib/cfx_bitmapstorer.cpp b/third_party/pdfium/core/fxge/dib/cfx_bitmapstorer.cpp +index f57c00e..45a0a18 100644 +--- a/third_party/pdfium/core/fxge/dib/cfx_bitmapstorer.cpp ++++ b/third_party/pdfium/core/fxge/dib/cfx_bitmapstorer.cpp +@@ -6,6 +6,8 @@ + + #include "core/fxge/dib/cfx_bitmapstorer.h" + ++#include ++ + #include + + #include "core/fxge/dib/cfx_dibitmap.h" +diff --git a/third_party/pdfium/core/fxge/dib/cfx_dibbase.cpp b/third_party/pdfium/core/fxge/dib/cfx_dibbase.cpp +index 4ec0ddb..a1de2fb 100644 +--- a/third_party/pdfium/core/fxge/dib/cfx_dibbase.cpp ++++ b/third_party/pdfium/core/fxge/dib/cfx_dibbase.cpp +@@ -6,6 +6,8 @@ + + #include "core/fxge/dib/cfx_dibbase.h" + ++#include ++ + #include + #include + #include +diff --git a/third_party/pdfium/core/fxge/dib/cfx_dibitmap.cpp b/third_party/pdfium/core/fxge/dib/cfx_dibitmap.cpp +index d7ccf6c..94e8acc 100644 +--- a/third_party/pdfium/core/fxge/dib/cfx_dibitmap.cpp ++++ b/third_party/pdfium/core/fxge/dib/cfx_dibitmap.cpp +@@ -6,6 +6,8 @@ + + #include "core/fxge/dib/cfx_dibitmap.h" + ++#include ++ + #include + #include + #include +diff --git a/third_party/pdfium/core/fxge/dib/cfx_scanlinecompositor.cpp b/third_party/pdfium/core/fxge/dib/cfx_scanlinecompositor.cpp +index e8362d7..c04c6dc 100644 +--- a/third_party/pdfium/core/fxge/dib/cfx_scanlinecompositor.cpp ++++ b/third_party/pdfium/core/fxge/dib/cfx_scanlinecompositor.cpp +@@ -6,6 +6,8 @@ + + #include "core/fxge/dib/cfx_scanlinecompositor.h" + ++#include ++ + #include + + #include "core/fxge/dib/fx_dib.h" diff --git a/chromium-93.0.4577.63-clang-format.patch b/chromium-93.0.4577.63-clang-format.patch new file mode 100644 index 00000000..77e842ea --- /dev/null +++ b/chromium-93.0.4577.63-clang-format.patch @@ -0,0 +1,34 @@ +diff -up chromium-93.0.4577.63/buildtools/linux64/clang-format.clang-format-py3 chromium-93.0.4577.63/buildtools/linux64/clang-format +--- chromium-93.0.4577.63/buildtools/linux64/clang-format.clang-format-py3 2021-09-03 04:42:46.736294345 +0000 ++++ chromium-93.0.4577.63/buildtools/linux64/clang-format 2021-09-03 04:59:55.296512600 +0000 +@@ -10,9 +10,9 @@ import sys + args = sys.argv[1:] + inputfiles = [a for a in args if not a.startswith('-')] + +-contents = '' ++contents = b'' + if '-' in args or not inputfiles: +- contents = sys.stdin.read() ++ contents = sys.stdin.buffer.read() + + # Tarball builds may or may not have depot_tools in $PATH. In the former case, + # running 'clang-format' will call back into this script infinitely. Strip off +@@ -34,14 +34,14 @@ try: + stdout, stderr = proc.communicate(input=contents) + # Ignore if clang-format fails. Eg: it may be too old to support C++14. + if proc.returncode == 0: +- sys.stdout.write(stdout) +- sys.stderr.write(stderr) ++ sys.stdout.buffer.write(stdout) ++ sys.stderr.buffer.write(stderr) + sys.exit(0) + except OSError: + # Ignore if clang-format is not installed. + pass + + # If any failure happens, continue with unformatted files. +-sys.stdout.write(contents) ++sys.stdout.buffer.write(contents) + for inputfile in inputfiles: +- sys.stdout.write(open(inputfile).read()) ++ sys.stdout.buffer.write(open(inputfile).read()) diff --git a/chromium-93.0.4577.63-freetype-2.11.patch b/chromium-93.0.4577.63-freetype-2.11.patch new file mode 100644 index 00000000..0c0e95e6 --- /dev/null +++ b/chromium-93.0.4577.63-freetype-2.11.patch @@ -0,0 +1,52 @@ +diff -up chromium-93.0.4577.63/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp.freetype-2.11 chromium-93.0.4577.63/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp +--- chromium-93.0.4577.63/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp.freetype-2.11 2021-09-02 08:49:18.996863417 -0400 ++++ chromium-93.0.4577.63/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp 2021-09-02 08:56:07.716626801 -0400 +@@ -712,7 +712,11 @@ void colrv1_draw_paint(SkCanvas* canvas, + canvas->drawPaint(colrPaint); + break; + } ++#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11 + case FT_COLR_PAINTFORMAT_TRANSFORM: ++#else ++ case FT_COLR_PAINTFORMAT_TRANSFORMED: ++#endif + case FT_COLR_PAINTFORMAT_TRANSLATE: + case FT_COLR_PAINTFORMAT_SCALE: + case FT_COLR_PAINTFORMAT_ROTATE: +@@ -760,10 +764,17 @@ void colrv1_transform(SkCanvas* canvas, + SkMatrix transform; + + switch (colrv1_paint.format) { ++#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11 + case FT_COLR_PAINTFORMAT_TRANSFORM: { + transform = ToSkMatrix(colrv1_paint.u.transform.affine); + break; + } ++#else ++ case FT_COLR_PAINTFORMAT_TRANSFORMED: { ++ transform = ToSkMatrix(colrv1_paint.u.transformed.affine); ++ break; ++ } ++#endif + case FT_COLR_PAINTFORMAT_TRANSLATE: { + transform = SkMatrix::Translate( + SkFixedToScalar(colrv1_paint.u.translate.dx), +@@ -889,11 +900,18 @@ bool colrv1_traverse_paint(SkCanvas* can + traverse_result = colrv1_start_glyph(canvas, palette, face, paint.u.colr_glyph.glyphID, + FT_COLOR_NO_ROOT_TRANSFORM); + break; ++#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11 + case FT_COLR_PAINTFORMAT_TRANSFORM: + colrv1_transform(canvas, face, paint); + traverse_result = colrv1_traverse_paint(canvas, palette, face, + paint.u.transform.paint, visited_set); + break; ++#else ++ case FT_COLR_PAINTFORMAT_TRANSFORMED: ++ colrv1_transform(canvas, face, paint); ++ traverse_result = colrv1_traverse_paint(canvas, palette, face, ++ paint.u.transformed.paint, visited_set); ++#endif + case FT_COLR_PAINTFORMAT_TRANSLATE: + colrv1_transform(canvas, face, paint); + traverse_result = colrv1_traverse_paint(canvas, palette, face, diff --git a/chromium-93.0.4577.63-missing-cstring.patch b/chromium-93.0.4577.63-missing-cstring.patch new file mode 100644 index 00000000..47699a31 --- /dev/null +++ b/chromium-93.0.4577.63-missing-cstring.patch @@ -0,0 +1,45 @@ +diff -up chromium-93.0.4577.63/net/base/test_data_stream.cc.missing-cstring chromium-93.0.4577.63/net/base/test_data_stream.cc +--- chromium-93.0.4577.63/net/base/test_data_stream.cc.missing-cstring 2021-09-03 13:59:54.051831465 +0000 ++++ chromium-93.0.4577.63/net/base/test_data_stream.cc 2021-09-03 14:00:05.448414041 +0000 +@@ -5,6 +5,7 @@ + #include "net/base/test_data_stream.h" + + #include ++#include + + namespace net { + +diff -up chromium-93.0.4577.63/third_party/webrtc/audio/utility/channel_mixer.cc.missing-cstring chromium-93.0.4577.63/third_party/webrtc/audio/utility/channel_mixer.cc +--- chromium-93.0.4577.63/third_party/webrtc/audio/utility/channel_mixer.cc.missing-cstring 2021-09-03 12:29:44.105246962 +0000 ++++ chromium-93.0.4577.63/third_party/webrtc/audio/utility/channel_mixer.cc 2021-09-03 12:29:44.106246925 +0000 +@@ -8,6 +8,8 @@ + * be found in the AUTHORS file in the root of the source tree. + */ + ++#include ++ + #include "audio/utility/channel_mixer.h" + + #include "audio/utility/channel_mixing_matrix.h" +diff -up chromium-93.0.4577.63/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc.missing-cstring chromium-93.0.4577.63/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc +--- chromium-93.0.4577.63/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc.missing-cstring 2021-09-03 12:29:43.585266089 +0000 ++++ chromium-93.0.4577.63/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc 2021-09-03 12:29:43.585266089 +0000 +@@ -23,6 +23,7 @@ + #include + #include + ++#include + #include + #include + +diff -up chromium-93.0.4577.63/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-cstring chromium-93.0.4577.63/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc +--- chromium-93.0.4577.63/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-cstring 2021-09-03 12:29:43.275277492 +0000 ++++ chromium-93.0.4577.63/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc 2021-09-03 12:29:43.273277565 +0000 +@@ -10,6 +10,7 @@ + + #include "modules/video_coding/utility/ivf_file_reader.h" + ++#include + #include + #include + diff --git a/chromium-93.0.4577.63-mojo-header-fix.patch b/chromium-93.0.4577.63-mojo-header-fix.patch new file mode 100644 index 00000000..edd66efb --- /dev/null +++ b/chromium-93.0.4577.63-mojo-header-fix.patch @@ -0,0 +1,12 @@ +diff -up chromium-93.0.4577.63/services/network/test/test_url_loader_factory.h.mojo-header-fix chromium-93.0.4577.63/services/network/test/test_url_loader_factory.h +--- chromium-93.0.4577.63/services/network/test/test_url_loader_factory.h.mojo-header-fix 2021-09-03 17:22:17.902206557 +0000 ++++ chromium-93.0.4577.63/services/network/test/test_url_loader_factory.h 2021-09-03 17:22:31.853693947 +0000 +@@ -19,7 +19,7 @@ + #include "services/network/public/cpp/resource_request.h" + #include "services/network/public/mojom/url_loader.mojom.h" + #include "services/network/public/mojom/url_loader_factory.mojom.h" +-#include "services/network/public/mojom/url_response_head.mojom-forward.h" ++#include "services/network/public/mojom/url_response_head.mojom.h" + + namespace network { + class WeakWrapperSharedURLLoaderFactory; diff --git a/chromium-93.0.4577.63-norar.patch b/chromium-93.0.4577.63-norar.patch new file mode 100644 index 00000000..5b453cad --- /dev/null +++ b/chromium-93.0.4577.63-norar.patch @@ -0,0 +1,90 @@ +diff -up chromium-93.0.4577.63/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-93.0.4577.63/chrome/common/safe_browsing/BUILD.gn +--- chromium-93.0.4577.63/chrome/common/safe_browsing/BUILD.gn.nounrar 2021-09-02 08:22:31.280927364 -0400 ++++ chromium-93.0.4577.63/chrome/common/safe_browsing/BUILD.gn 2021-09-02 08:23:32.143189935 -0400 +@@ -43,39 +43,6 @@ if (safe_browsing_mode == 1) { + public_deps = [ "//components/safe_browsing/core/common/proto:csd_proto" ] + } + +- source_set("rar_analyzer") { +- sources = [ +- "rar_analyzer.cc", +- "rar_analyzer.h", +- ] +- +- deps = [ +- ":archive_analyzer_results", +- ":download_type_util", +- "//base", +- "//base:i18n", +- "//components/safe_browsing/content/common:file_type_policies", +- "//components/safe_browsing/core/common", +- "//third_party/unrar:unrar", +- ] +- +- defines = [ +- "_FILE_OFFSET_BITS=64", +- "LARGEFILE_SOURCE", +- "RAR_SMP", +- "SILENT", +- +- # The following is set to disable certain macro definitions in the unrar +- # source code. +- "CHROMIUM_UNRAR", +- +- # Disables exceptions in unrar, replaces them with process termination. +- "UNRAR_NO_EXCEPTIONS", +- ] +- +- public_deps = [ "//components/safe_browsing/core/common/proto:csd_proto" ] +- } +- + if (is_mac) { + source_set("disk_image_type_sniffer_mac") { + sources = [ +@@ -149,7 +116,6 @@ source_set("safe_browsing") { + ":archive_analyzer_results", + ":binary_feature_extractor", + ":download_type_util", +- ":rar_analyzer", + "//components/safe_browsing/core/common", + ] + +diff -up chromium-93.0.4577.63/chrome/common/safe_browsing/DEPS.nounrar chromium-93.0.4577.63/chrome/common/safe_browsing/DEPS +--- chromium-93.0.4577.63/chrome/common/safe_browsing/DEPS.nounrar 2021-09-02 08:22:31.280927364 -0400 ++++ chromium-93.0.4577.63/chrome/common/safe_browsing/DEPS 2021-09-02 08:23:56.092293262 -0400 +@@ -2,6 +2,5 @@ include_rules = [ + "+components/safe_browsing/content/common", + "+components/safe_browsing/core/common", + "+third_party/protobuf", +- "+third_party/unrar", + "+third_party/zlib", + ] +diff -up chromium-93.0.4577.63/chrome/services/file_util/BUILD.gn.nounrar chromium-93.0.4577.63/chrome/services/file_util/BUILD.gn +--- chromium-93.0.4577.63/chrome/services/file_util/BUILD.gn.nounrar 2021-08-31 21:39:29.000000000 -0400 ++++ chromium-93.0.4577.63/chrome/services/file_util/BUILD.gn 2021-09-02 08:22:31.280927364 -0400 +@@ -50,7 +50,6 @@ source_set("file_util") { + deps += [ + "//chrome/common/safe_browsing", + "//chrome/common/safe_browsing:archive_analyzer_results", +- "//chrome/common/safe_browsing:rar_analyzer", + ] + } + +diff -up chromium-93.0.4577.63/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-93.0.4577.63/chrome/services/file_util/safe_archive_analyzer.cc +--- chromium-93.0.4577.63/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2021-08-31 21:39:29.000000000 -0400 ++++ chromium-93.0.4577.63/chrome/services/file_util/safe_archive_analyzer.cc 2021-09-02 08:22:31.281927369 -0400 +@@ -45,10 +45,14 @@ void SafeArchiveAnalyzer::AnalyzeDmgFile + void SafeArchiveAnalyzer::AnalyzeRarFile(base::File rar_file, + base::File temporary_file, + AnalyzeRarFileCallback callback) { ++#if 0 + DCHECK(rar_file.IsValid()); + + safe_browsing::ArchiveAnalyzerResults results; + safe_browsing::rar_analyzer::AnalyzeRarFile( + std::move(rar_file), std::move(temporary_file), &results); + std::move(callback).Run(results); ++#else ++ NOTREACHED(); ++#endif + } diff --git a/chromium-93.0.4577.63-py3-bootstrap.patch b/chromium-93.0.4577.63-py3-bootstrap.patch new file mode 100644 index 00000000..899495f4 --- /dev/null +++ b/chromium-93.0.4577.63-py3-bootstrap.patch @@ -0,0 +1,12 @@ +diff -up chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py.py3 chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py +--- chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py.py3 2021-08-31 21:40:34.000000000 -0400 ++++ chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py 2021-09-02 08:26:04.415846917 -0400 +@@ -130,7 +130,7 @@ def main(argv): + if not options.debug: + gn_gen_args += ' is_debug=false' + subprocess.check_call([ +- gn_path, 'gen', out_dir, ++ gn_path, 'gen', out_dir, ' --script-executable=/usr/bin/python3', + '--args=%s' % gn_gen_args, "--root=" + SRC_ROOT + ]) + diff --git a/chromium-93.0.4577.63-remoting-nodestructor-fix.patch b/chromium-93.0.4577.63-remoting-nodestructor-fix.patch new file mode 100644 index 00000000..6f2e419c --- /dev/null +++ b/chromium-93.0.4577.63-remoting-nodestructor-fix.patch @@ -0,0 +1,21 @@ +diff -up chromium-93.0.4577.63/remoting/host/remote_open_url_client.cc.remoting-nodestructor-fix chromium-93.0.4577.63/remoting/host/remote_open_url_client.cc +--- chromium-93.0.4577.63/remoting/host/remote_open_url_client.cc.remoting-nodestructor-fix 2021-09-03 17:30:44.162605313 +0000 ++++ chromium-93.0.4577.63/remoting/host/remote_open_url_client.cc 2021-09-03 17:31:01.017986003 +0000 +@@ -56,7 +56,7 @@ void ShowMessageDialog(const std::string + } + + bool IsBrowserValid(const std::string& browser) { +- static const base::NoDestructor> invalid_browsers( ++ static const base::NoDestructor> invalid_browsers{ + { + // This is the chromoting forwarder itself. + "crd-url-forwarder.desktop", +@@ -64,7 +64,7 @@ bool IsBrowserValid(const std::string& b + // XFCE's forwarder. May potentially launch the chromoting forwarder + // recursively. + "xfce4-web-browser.desktop", +- }); ++ }}; + if (browser.empty()) { + return false; + } diff --git a/chromium-93.0.4577.63-vector-fix.patch b/chromium-93.0.4577.63-vector-fix.patch new file mode 100644 index 00000000..00e7d628 --- /dev/null +++ b/chromium-93.0.4577.63-vector-fix.patch @@ -0,0 +1,11 @@ +diff -up chromium-93.0.4577.63/components/cast_channel/enum_table.h.vector-fix chromium-93.0.4577.63/components/cast_channel/enum_table.h +--- chromium-93.0.4577.63/components/cast_channel/enum_table.h.vector-fix 2021-09-03 12:23:37.974714814 +0000 ++++ chromium-93.0.4577.63/components/cast_channel/enum_table.h 2021-09-03 12:23:51.330223540 +0000 +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + #include "base/check_op.h" + #include "base/macros.h" diff --git a/chromium-93.0.4577.63-widevine-no-download.patch b/chromium-93.0.4577.63-widevine-no-download.patch new file mode 100644 index 00000000..1266e51f --- /dev/null +++ b/chromium-93.0.4577.63-widevine-no-download.patch @@ -0,0 +1,14 @@ +diff -up chromium-93.0.4577.63/chrome/browser/component_updater/registration.cc.widevine-no-download chromium-93.0.4577.63/chrome/browser/component_updater/registration.cc +--- chromium-93.0.4577.63/chrome/browser/component_updater/registration.cc.widevine-no-download 2021-09-02 08:37:03.910692041 -0400 ++++ chromium-93.0.4577.63/chrome/browser/component_updater/registration.cc 2021-09-02 08:45:07.446778150 -0400 +@@ -118,10 +118,6 @@ void RegisterComponentsForUpdate(bool is + RegisterMediaFoundationWidevineCdmComponent(cus); + #endif + +-#if BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) +- RegisterWidevineCdmComponent(cus); +-#endif // BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) +- + #if BUILDFLAG(ENABLE_NACL) && !defined(OS_ANDROID) + #if BUILDFLAG(IS_CHROMEOS_ASH) + // PNaCl on Chrome OS is on rootfs and there is no need to download it. But diff --git a/chromium-93.0.4577.82-harfbuzz3.patch b/chromium-93.0.4577.82-harfbuzz3.patch new file mode 100644 index 00000000..1ed23fea --- /dev/null +++ b/chromium-93.0.4577.82-harfbuzz3.patch @@ -0,0 +1,97 @@ +diff -up chromium-93.0.4577.82/components/paint_preview/common/subset_font.cc.hbfix chromium-93.0.4577.82/components/paint_preview/common/subset_font.cc +--- chromium-93.0.4577.82/components/paint_preview/common/subset_font.cc.hbfix 2021-09-20 11:37:58.633517817 -0400 ++++ chromium-93.0.4577.82/components/paint_preview/common/subset_font.cc 2021-09-20 11:40:12.111235467 -0400 +@@ -72,9 +72,11 @@ sk_sp SubsetFont(SkTypeface* typ + hb_set_t* glyphs = + hb_subset_input_glyph_set(input.get()); // Owned by |input|. + usage.ForEach(base::BindRepeating(&AddGlyphs, base::Unretained(glyphs))); +- hb_subset_input_set_retain_gids(input.get(), true); ++ hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS); + +- HbScoped subset_face(hb_subset(face.get(), input.get())); ++ HbScoped subset_face(hb_subset_or_fail(face.get(), input.get())); ++ if (!subset_face) ++ return nullptr; + HbScoped subset_blob(hb_face_reference_blob(subset_face.get())); + if (!subset_blob) + return nullptr; +diff -up chromium-93.0.4577.82/third_party/skia/gn/skia.gni.hbfix chromium-93.0.4577.82/third_party/skia/gn/skia.gni +--- chromium-93.0.4577.82/third_party/skia/gn/skia.gni.hbfix 2021-09-20 11:41:20.078600944 -0400 ++++ chromium-93.0.4577.82/third_party/skia/gn/skia.gni 2021-09-20 11:42:29.851976086 -0400 +@@ -33,8 +33,6 @@ declare_args() { + skia_include_multiframe_procs = false + skia_lex = false + skia_libgifcodec_path = "third_party/externals/libgifcodec" +- skia_pdf_subset_harfbuzz = +- false # TODO: set skia_pdf_subset_harfbuzz to skia_use_harfbuzz. + skia_qt_path = getenv("QT_PATH") + skia_skqp_global_error_tolerance = 0 + skia_tools_require_resources = false +@@ -99,6 +97,10 @@ declare_args() { + } + + declare_args() { ++ skia_pdf_subset_harfbuzz = skia_use_harfbuzz ++} ++ ++declare_args() { + skia_compile_sksl_tests = skia_compile_processors + skia_enable_fontmgr_android = skia_use_expat && skia_use_freetype + skia_enable_fontmgr_custom_directory = skia_use_freetype && !is_fuchsia +diff -up chromium-93.0.4577.82/third_party/skia/src/pdf/SkPDFSubsetFont.cpp.hbfix chromium-93.0.4577.82/third_party/skia/src/pdf/SkPDFSubsetFont.cpp +--- chromium-93.0.4577.82/third_party/skia/src/pdf/SkPDFSubsetFont.cpp.hbfix 2021-09-20 13:34:57.861369449 -0400 ++++ chromium-93.0.4577.82/third_party/skia/src/pdf/SkPDFSubsetFont.cpp 2021-09-20 13:38:28.063504311 -0400 +@@ -49,6 +49,37 @@ static sk_sp to_data(HBBlob blob + blob.release()); + } + ++template using void_t = void; ++template ++struct SkPDFHarfBuzzSubset { ++ // This is the HarfBuzz 3.0 interface. ++ // hb_subset_flags_t does not exist in 2.0. It isn't dependent on T, so inline the value of ++ // HB_SUBSET_FLAGS_RETAIN_GIDS until 2.0 is no longer supported. ++ static HBFace Make(T input, hb_face_t* face) { ++ // TODO: When possible, check if a font is 'tricky' with FT_IS_TRICKY. ++ // If it isn't known if a font is 'tricky', retain the hints. ++ hb_subset_input_set_flags(input, 2/*HB_SUBSET_FLAGS_RETAIN_GIDS*/); ++ return HBFace(hb_subset_or_fail(face, input)); ++ } ++}; ++template ++struct SkPDFHarfBuzzSubset(), std::declval())), ++ decltype(hb_subset_input_set_drop_hints(std::declval(), std::declval())), ++ decltype(hb_subset(std::declval(), std::declval())) ++ >> ++{ ++ // This is the HarfBuzz 2.0 (non-public) interface, used if it exists. ++ // This code should be removed as soon as all users are migrated to the newer API. ++ static HBFace Make(T input, hb_face_t* face) { ++ hb_subset_input_set_retain_gids(input, true); ++ // TODO: When possible, check if a font is 'tricky' with FT_IS_TRICKY. ++ // If it isn't known if a font is 'tricky', retain the hints. ++ hb_subset_input_set_drop_hints(input, false); ++ return HBFace(hb_subset(face, input)); ++ } ++}; ++ + static sk_sp subset_harfbuzz(sk_sp fontData, + const SkPDFGlyphUse& glyphUsage, + int ttcIndex) { +@@ -71,11 +102,10 @@ static sk_sp subset_harfbuzz(sk_ + hb_set_t* glyphs = hb_subset_input_glyph_set(input.get()); + glyphUsage.getSetValues([&glyphs](unsigned gid) { hb_set_add(glyphs, gid);}); + +- hb_subset_input_set_retain_gids(input.get(), true); +- // TODO: When possible, check if a font is 'tricky' with FT_IS_TRICKY. +- // If it isn't known if a font is 'tricky', retain the hints. +- hb_subset_input_set_drop_hints(input.get(), false); +- HBFace subset(hb_subset(face.get(), input.get())); ++ HBFace subset = SkPDFHarfBuzzSubset::Make(input.get(), face.get()); ++ if (!subset) { ++ return nullptr; ++ } + HBBlob result(hb_face_reference_blob(subset.get())); + return to_data(std::move(result)); + } diff --git a/chromium-94-ConversionStorageSql-lambda.patch b/chromium-94-ConversionStorageSql-lambda.patch new file mode 100644 index 00000000..6746fec7 --- /dev/null +++ b/chromium-94-ConversionStorageSql-lambda.patch @@ -0,0 +1,31 @@ +From 45bea088d3771c7ff9f77173e451422452c031b3 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Mon, 02 Aug 2021 16:57:05 +0000 +Subject: [PATCH] GCC: drop WARN_USED_RESULT in lambda in ConversionStorageSql + +GCC 9.3 only allows GNU attributes between [] and () in lambda +expressions. See https://gcc.gnu.org/PR90333 for details. However, +clang only allows attributes after () only. Seems not strictly +necessary to enforce the attribute here. + +Bug: 819294 +Change-Id: I342deb25239837dea0f6f5e7709b1467789e342b +--- + +diff --git a/content/browser/conversions/conversion_storage_sql.cc b/content/browser/conversions/conversion_storage_sql.cc +index 84bc897..b6fc4e9 100644 +--- a/content/browser/conversions/conversion_storage_sql.cc ++++ b/content/browser/conversions/conversion_storage_sql.cc +@@ -688,9 +688,11 @@ + bool ConversionStorageSql::DeleteExpiredImpressions() { + const int kMaxDeletesPerBatch = 100; + ++ // GCC accepts attribute between [] and () only ++ // clang accepts attribute after () only + auto delete_impressions_from_paged_select = + [this](sql::Statement& statement) +- VALID_CONTEXT_REQUIRED(sequence_checker_) WARN_UNUSED_RESULT -> bool { ++ VALID_CONTEXT_REQUIRED(sequence_checker_) -> bool { + while (true) { + std::vector impression_ids; + while (statement.Step()) { diff --git a/chromium-94-CustomSpaces-include.patch b/chromium-94-CustomSpaces-include.patch new file mode 100644 index 00000000..01757758 --- /dev/null +++ b/chromium-94-CustomSpaces-include.patch @@ -0,0 +1,24 @@ +From 4eeacdaa57b29a079fe09315eb22557c06aa522e Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Fri, 13 Aug 2021 12:57:42 +0000 +Subject: [PATCH] IWYU: add memory for std::unique_ptr in blink::CustomSpaces + +--- + .../blink/renderer/platform/heap/v8_wrapper/custom_spaces.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/third_party/blink/renderer/platform/heap/v8_wrapper/custom_spaces.h b/third_party/blink/renderer/platform/heap/v8_wrapper/custom_spaces.h +index df0465a..640cb33 100644 +--- a/third_party/blink/renderer/platform/heap/v8_wrapper/custom_spaces.h ++++ b/third_party/blink/renderer/platform/heap/v8_wrapper/custom_spaces.h +@@ -5,6 +5,7 @@ + #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_CUSTOM_SPACES_H_ + #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_CUSTOM_SPACES_H_ + ++#include + #include + + #include "third_party/blink/renderer/platform/platform_export.h" +-- +2.31.1 + diff --git a/chromium-94.0.4606.54-gcc9-drop-rsp-clobber.patch b/chromium-94.0.4606.54-gcc9-drop-rsp-clobber.patch new file mode 100644 index 00000000..0ccd0b14 --- /dev/null +++ b/chromium-94.0.4606.54-gcc9-drop-rsp-clobber.patch @@ -0,0 +1,12 @@ +diff -up chromium-94.0.4606.54/third_party/tcmalloc/vendor/src/base/linux_syscall_support.h.gcc9 chromium-94.0.4606.54/third_party/tcmalloc/vendor/src/base/linux_syscall_support.h +--- chromium-94.0.4606.54/third_party/tcmalloc/vendor/src/base/linux_syscall_support.h.gcc9 2021-09-20 15:13:05.000000000 -0400 ++++ chromium-94.0.4606.54/third_party/tcmalloc/vendor/src/base/linux_syscall_support.h 2021-09-23 12:41:53.540357702 -0400 +@@ -1485,7 +1485,7 @@ struct kernel_stat { + "d"(LSS_SYSCALL_ARG(parent_tidptr)), + "r"(LSS_SYSCALL_ARG(newtls)), + "r"(LSS_SYSCALL_ARG(child_tidptr)) +- : "rsp", "memory", "r8", "r10", "r11", "rcx"); ++ : "memory", "r8", "r10", "r11", "rcx"); + } + LSS_RETURN(int, __res); + } diff --git a/chromium-94.0.4606.54-remoting-nodestructor-fix.patch b/chromium-94.0.4606.54-remoting-nodestructor-fix.patch new file mode 100644 index 00000000..ce64c553 --- /dev/null +++ b/chromium-94.0.4606.54-remoting-nodestructor-fix.patch @@ -0,0 +1,22 @@ +diff -up chromium-94.0.4606.54/remoting/host/remote_open_url_client.cc.remoting-nodestructor-fix chromium-94.0.4606.54/remoting/host/remote_open_url_client.cc +diff -up chromium-94.0.4606.54/remoting/host/remote_open_url_client_delegate_linux.cc.remoting-nodestructor-fix chromium-94.0.4606.54/remoting/host/remote_open_url_client_delegate_linux.cc +--- chromium-94.0.4606.54/remoting/host/remote_open_url_client_delegate_linux.cc.remoting-nodestructor-fix 2021-09-24 11:02:02.662082902 -0400 ++++ chromium-94.0.4606.54/remoting/host/remote_open_url_client_delegate_linux.cc 2021-09-24 11:06:05.207472179 -0400 +@@ -47,7 +47,7 @@ void ShowMessageDialog(const std::string + } + + bool IsBrowserValid(const std::string& browser) { +- static const base::NoDestructor> invalid_browsers( ++ static const base::NoDestructor> invalid_browsers{ + { + // This is the chromoting forwarder itself. + "crd-url-forwarder.desktop", +@@ -55,7 +55,7 @@ bool IsBrowserValid(const std::string& b + // XFCE's forwarder. May potentially launch the chromoting forwarder + // recursively. + "xfce4-web-browser.desktop", +- }); ++ }}; + if (browser.empty()) { + return false; + } diff --git a/chromium-94.0.4606.54-webrtc-BUILD.gn-fix-multiple-defines.patch b/chromium-94.0.4606.54-webrtc-BUILD.gn-fix-multiple-defines.patch new file mode 100644 index 00000000..04ed84e5 --- /dev/null +++ b/chromium-94.0.4606.54-webrtc-BUILD.gn-fix-multiple-defines.patch @@ -0,0 +1,16 @@ +diff -up chromium-94.0.4606.54/third_party/webrtc/BUILD.gn.fix-multiple-define chromium-94.0.4606.54/third_party/webrtc/BUILD.gn +--- chromium-94.0.4606.54/third_party/webrtc/BUILD.gn.fix-multiple-define 2021-09-24 13:22:48.067565858 -0400 ++++ chromium-94.0.4606.54/third_party/webrtc/BUILD.gn 2021-09-24 13:23:10.163664830 -0400 +@@ -119,10 +119,10 @@ config("common_inherited_config") { + ldflags = [] + + if (rtc_enable_symbol_export || is_component_build) { +- defines = [ "WEBRTC_ENABLE_SYMBOL_EXPORT" ] ++ defines += [ "WEBRTC_ENABLE_SYMBOL_EXPORT" ] + } + if (rtc_enable_objc_symbol_export) { +- defines = [ "WEBRTC_ENABLE_OBJC_SYMBOL_EXPORT" ] ++ defines += [ "WEBRTC_ENABLE_OBJC_SYMBOL_EXPORT" ] + } + + if (build_with_mozilla) { diff --git a/chromium-94.0.4606.61-remoting-extra-qualification.patch b/chromium-94.0.4606.61-remoting-extra-qualification.patch new file mode 100644 index 00000000..2b647391 --- /dev/null +++ b/chromium-94.0.4606.61-remoting-extra-qualification.patch @@ -0,0 +1,12 @@ +diff -up chromium-94.0.4606.61/remoting/host/mojom/remoting_mojom_traits.h.extra-qualification chromium-94.0.4606.61/remoting/host/mojom/remoting_mojom_traits.h +--- chromium-94.0.4606.61/remoting/host/mojom/remoting_mojom_traits.h.extra-qualification 2021-09-25 01:48:28.812426004 +0000 ++++ chromium-94.0.4606.61/remoting/host/mojom/remoting_mojom_traits.h 2021-09-25 01:48:59.072267580 +0000 +@@ -17,7 +17,7 @@ + namespace mojo { + + template <> +-class mojo::StructTraits { + public: + static const std::string& mime_type( diff --git a/chromium-94.0.4606.71-InkDropHost-crash.patch b/chromium-94.0.4606.71-InkDropHost-crash.patch new file mode 100644 index 00000000..b5e27949 --- /dev/null +++ b/chromium-94.0.4606.71-InkDropHost-crash.patch @@ -0,0 +1,24 @@ +diff -up chromium-94.0.4606.71/ui/views/animation/ink_drop_host_view.h.InkDropHost-crash chromium-94.0.4606.71/ui/views/animation/ink_drop_host_view.h +--- chromium-94.0.4606.71/ui/views/animation/ink_drop_host_view.h.InkDropHost-crash 2021-10-05 16:04:46.313586509 -0400 ++++ chromium-94.0.4606.71/ui/views/animation/ink_drop_host_view.h 2021-10-05 16:05:12.213732558 -0400 +@@ -228,6 +228,11 @@ class VIEWS_EXPORT InkDropHost { + // Used to observe View and inform the InkDrop of host-transform changes. + ViewLayerTransformObserver host_view_transform_observer_; + ++ // Declared before |ink_drop_|, because InkDropImpl may call ++ // RemoveInkDropLayer on partly destructed InkDropHost. In ++ // that case |ink_drop_mask_| must be still valid. ++ std::unique_ptr ink_drop_mask_; ++ + // Should not be accessed directly. Use GetInkDrop() instead. + std::unique_ptr ink_drop_; + +@@ -249,8 +254,6 @@ class VIEWS_EXPORT InkDropHost { + int ink_drop_small_corner_radius_ = 2; + int ink_drop_large_corner_radius_ = 4; + +- std::unique_ptr ink_drop_mask_; +- + base::RepeatingCallback()> create_ink_drop_callback_; + base::RepeatingCallback()> + create_ink_drop_ripple_callback_; diff --git a/chromium-94.0.4606.71-PartitionFree-nullptr-fix.patch b/chromium-94.0.4606.71-PartitionFree-nullptr-fix.patch new file mode 100644 index 00000000..29777efc --- /dev/null +++ b/chromium-94.0.4606.71-PartitionFree-nullptr-fix.patch @@ -0,0 +1,15 @@ +diff -up chromium-94.0.4606.71/base/allocator/allocator_shim_default_dispatch_to_partition_alloc.cc.nullptr-fix chromium-94.0.4606.71/base/allocator/allocator_shim_default_dispatch_to_partition_alloc.cc +--- chromium-94.0.4606.71/base/allocator/allocator_shim_default_dispatch_to_partition_alloc.cc.nullptr-fix 2021-10-06 15:23:11.590602162 -0400 ++++ chromium-94.0.4606.71/base/allocator/allocator_shim_default_dispatch_to_partition_alloc.cc 2021-10-06 15:29:21.508762249 -0400 +@@ -380,7 +380,10 @@ void PartitionFree(const AllocatorDispat + size_t PartitionGetSizeEstimate(const AllocatorDispatch*, + void* address, + void* context) { +- PA_DCHECK(address); ++ // This is used to implement malloc_usable_size(3). Per its man page, "if ptr ++ // is NULL, 0 is returned". ++ if (!address) ++ return 0; + + #if defined(OS_APPLE) + if (!base::IsManagedByPartitionAlloc(address)) { diff --git a/chromium-94.0.4606.71-remoting-missing-cmath-header.patch b/chromium-94.0.4606.71-remoting-missing-cmath-header.patch new file mode 100644 index 00000000..060c71b3 --- /dev/null +++ b/chromium-94.0.4606.71-remoting-missing-cmath-header.patch @@ -0,0 +1,11 @@ +diff -up chromium-94.0.4606.71/remoting/codec/codec_test.cc.missing-header chromium-94.0.4606.71/remoting/codec/codec_test.cc +--- chromium-94.0.4606.71/remoting/codec/codec_test.cc.missing-header 2021-10-07 18:01:11.846157616 +0000 ++++ chromium-94.0.4606.71/remoting/codec/codec_test.cc 2021-10-07 18:01:22.913662166 +0000 +@@ -8,6 +8,7 @@ + #include + #include + ++#include + #include + #include + diff --git a/chromium-94.0.4606.81-clang-format.patch b/chromium-94.0.4606.81-clang-format.patch new file mode 100644 index 00000000..960e7a47 --- /dev/null +++ b/chromium-94.0.4606.81-clang-format.patch @@ -0,0 +1,37 @@ +diff -up chromium-94.0.4606.81/buildtools/linux64/clang-format.clang-format-py3 chromium-94.0.4606.81/buildtools/linux64/clang-format +--- chromium-94.0.4606.81/buildtools/linux64/clang-format.clang-format-py3 2021-10-08 11:26:16.411861005 -0400 ++++ chromium-94.0.4606.81/buildtools/linux64/clang-format 2021-10-08 11:32:16.005895508 -0400 +@@ -12,9 +12,9 @@ def main(): + args = sys.argv[1:] + inputfiles = [a for a in args if not a.startswith('-')] + +- contents = '' ++ contents = b'' + if '-' in args or not inputfiles: +- contents = sys.stdin.read() ++ contents = sys.stdin.buffer.read() + + # Tarball builds may or may not have depot_tools in $PATH. In the former case, + # running 'clang-format' will call back into this script infinitely. Strip off +@@ -37,17 +37,17 @@ def main(): + stdout, stderr = proc.communicate(input=contents) + # Ignore if clang-format fails. Eg: it may be too old to support C++14. + if proc.returncode == 0: +- sys.stdout.write(stdout) +- sys.stderr.write(stderr) ++ sys.stdout.buffer.write(stdout) ++ sys.stderr.buffer.write(stderr) + return 0 + except OSError: + # Ignore if clang-format is not installed. + pass + + # If any failure happens, continue with unformatted files. +- sys.stdout.write(contents) ++ sys.stdout.buffer.write(contents) + for inputfile in inputfiles: +- sys.stdout.write(open(inputfile).read()) ++ sys.stdout.buffer.write(open(inputfile).read()) + + return 0 + diff --git a/chromium-94.0.4606.81-i686-low-memory-linking-hacks.patch b/chromium-94.0.4606.81-i686-low-memory-linking-hacks.patch new file mode 100644 index 00000000..a2cf7afe --- /dev/null +++ b/chromium-94.0.4606.81-i686-low-memory-linking-hacks.patch @@ -0,0 +1,13 @@ +diff -up chromium-94.0.4606.81/build/config/compiler/BUILD.gn.i686-hack chromium-94.0.4606.81/build/config/compiler/BUILD.gn +--- chromium-94.0.4606.81/build/config/compiler/BUILD.gn.i686-hack 2021-10-20 15:56:09.409349920 -0400 ++++ chromium-94.0.4606.81/build/config/compiler/BUILD.gn 2021-10-20 15:57:30.409831217 -0400 +@@ -360,6 +360,9 @@ config("compiler") { + if (fatal_linker_warnings && is_apple) { + ldflags += [ "-Wl,-fatal_warnings" ] + } ++ ++ ldflags += [ "-Wl,--no-keep-memory" ] ++ ldflags += [ "-Wl,--reduce-memory-overheads" ] + } + + if (is_clang && is_debug) { diff --git a/chromium-95-BitstreamReader-namespace.patch b/chromium-95-BitstreamReader-namespace.patch new file mode 100644 index 00000000..5a42614b --- /dev/null +++ b/chromium-95-BitstreamReader-namespace.patch @@ -0,0 +1,41 @@ +From c23f09d436b566934d02c26a19e3cf5d31545855 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Sat, 4 Sep 2021 17:02:00 +0000 +Subject: [PATCH] GCC: fix template specialization in webrtc::BitstreamReader + +GCC complains that explicit specialization in non-namespace scope +is happening for webrtc::BitstreamReader::Read(). However, specialization +for bool isn't used because std::is_unsigned::value returns true. +Add std::is_same for bool check and enable second specialization only +for bool types. + +--- + third_party/webrtc/rtc_base/bitstream_reader.h | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/third_party/webrtc/rtc_base/bitstream_reader.h b/third_party/webrtc/rtc_base/bitstream_reader.h +index 8c0f66f..cd8537f 100644 +--- a/third_party/webrtc/rtc_base/bitstream_reader.h ++++ b/third_party/webrtc/rtc_base/bitstream_reader.h +@@ -61,14 +61,16 @@ class BitstreamReader { + // Reads unsigned integer of fixed width. + template ::value && ++ !std::is_same::value && + sizeof(T) <= 8>::type* = nullptr> + ABSL_MUST_USE_RESULT T Read() { + return rtc::dchecked_cast(ReadBits(sizeof(T) * 8)); + } + + // Reads single bit as boolean. +- template <> +- ABSL_MUST_USE_RESULT bool Read() { ++ template ::value>::type* = nullptr> ++ ABSL_MUST_USE_RESULT bool Read() { + return ReadBit() != 0; + } + +-- +2.32.0 + diff --git a/chromium-95-eigen-avx-1.patch b/chromium-95-eigen-avx-1.patch new file mode 100644 index 00000000..21d520cc --- /dev/null +++ b/chromium-95-eigen-avx-1.patch @@ -0,0 +1,229 @@ +From 3d4ba855e014987cad86d62a8dff533492255695 Mon Sep 17 00:00:00 2001 +From: Antonio Sanchez +Date: Wed, 1 Sep 2021 14:11:21 -0700 +Subject: [PATCH] Fix AVX integer packet issues. + +Most are instances of AVX2 functions not protected by +`EIGEN_VECTORIZE_AVX2`. There was also a missing semi-colon +for AVX512. +--- + Eigen/src/Core/arch/AVX/PacketMath.h | 83 ++++++++++++++++++------- + Eigen/src/Core/arch/AVX512/PacketMath.h | 6 +- + 2 files changed, 63 insertions(+), 26 deletions(-) + +diff --git a/third_party/eigen3/src/Eigen/src/Core/arch/AVX/PacketMath.h b/third_party/eigen3/src/Eigen/src/Core/arch/AVX/PacketMath.h +index dc1a1d6b0..247ee4efd 100644 +--- a/third_party/eigen3/src/Eigen/src/Core/arch/AVX/PacketMath.h ++++ b/third_party/eigen3/src/Eigen/src/Core/arch/AVX/PacketMath.h +@@ -262,10 +262,6 @@ template<> EIGEN_STRONG_INLINE Packet4d peven_mask(const Packet4d& /*a*/) { retu + template<> EIGEN_STRONG_INLINE Packet8f pload1(const float* from) { return _mm256_broadcast_ss(from); } + template<> EIGEN_STRONG_INLINE Packet4d pload1(const double* from) { return _mm256_broadcast_sd(from); } + +-template<> EIGEN_STRONG_INLINE Packet8f plset(const float& a) { return _mm256_add_ps(_mm256_set1_ps(a), _mm256_set_ps(7.0,6.0,5.0,4.0,3.0,2.0,1.0,0.0)); } +-template<> EIGEN_STRONG_INLINE Packet4d plset(const double& a) { return _mm256_add_pd(_mm256_set1_pd(a), _mm256_set_pd(3.0,2.0,1.0,0.0)); } +-template<> EIGEN_STRONG_INLINE Packet8i plset(const int& a) { return _mm256_add_epi32(_mm256_set1_epi32(a), _mm256_set_epi32(7,6,5,4,3,2,1,0)); } +- + template<> EIGEN_STRONG_INLINE Packet8f padd(const Packet8f& a, const Packet8f& b) { return _mm256_add_ps(a,b); } + template<> EIGEN_STRONG_INLINE Packet4d padd(const Packet4d& a, const Packet4d& b) { return _mm256_add_pd(a,b); } + template<> EIGEN_STRONG_INLINE Packet8i padd(const Packet8i& a, const Packet8i& b) { +@@ -278,6 +274,10 @@ template<> EIGEN_STRONG_INLINE Packet8i padd(const Packet8i& a, const + #endif + } + ++template<> EIGEN_STRONG_INLINE Packet8f plset(const float& a) { return padd(pset1(a), _mm256_set_ps(7.0,6.0,5.0,4.0,3.0,2.0,1.0,0.0)); } ++template<> EIGEN_STRONG_INLINE Packet4d plset(const double& a) { return padd(pset1(a), _mm256_set_pd(3.0,2.0,1.0,0.0)); } ++template<> EIGEN_STRONG_INLINE Packet8i plset(const int& a) { return padd(pset1(a), _mm256_set_epi32(7,6,5,4,3,2,1,0)); } ++ + template<> EIGEN_STRONG_INLINE Packet8f psub(const Packet8f& a, const Packet8f& b) { return _mm256_sub_ps(a,b); } + template<> EIGEN_STRONG_INLINE Packet4d psub(const Packet4d& a, const Packet4d& b) { return _mm256_sub_pd(a,b); } + template<> EIGEN_STRONG_INLINE Packet8i psub(const Packet8i& a, const Packet8i& b) { +@@ -300,7 +300,7 @@ template<> EIGEN_STRONG_INLINE Packet4d pnegate(const Packet4d& a) + } + template<> EIGEN_STRONG_INLINE Packet8i pnegate(const Packet8i& a) + { +- return _mm256_sub_epi32(_mm256_set1_epi32(0), a); ++ return psub(pzero(a), a); + } + + template<> EIGEN_STRONG_INLINE Packet8f pconj(const Packet8f& a) { return a; } +@@ -419,7 +419,13 @@ template<> EIGEN_STRONG_INLINE Packet4d pmin(const Packet4d& a, const + #endif + } + template<> EIGEN_STRONG_INLINE Packet8i pmin(const Packet8i& a, const Packet8i& b) { ++#ifdef EIGEN_VECTORIZE_AVX2 + return _mm256_min_epi32(a, b); ++#else ++ __m128i lo = _mm_min_epi32(_mm256_extractf128_si256(a, 0), _mm256_extractf128_si256(b, 0)); ++ __m128i hi = _mm_min_epi32(_mm256_extractf128_si256(a, 1), _mm256_extractf128_si256(b, 1)); ++ return _mm256_insertf128_si256(_mm256_castsi128_si256(lo), (hi), 1); ++#endif + } + + template<> EIGEN_STRONG_INLINE Packet8f pmax(const Packet8f& a, const Packet8f& b) { +@@ -445,7 +451,13 @@ template<> EIGEN_STRONG_INLINE Packet4d pmax(const Packet4d& a, const + #endif + } + template<> EIGEN_STRONG_INLINE Packet8i pmax(const Packet8i& a, const Packet8i& b) { ++#ifdef EIGEN_VECTORIZE_AVX2 + return _mm256_max_epi32(a, b); ++#else ++ __m128i lo = _mm_max_epi32(_mm256_extractf128_si256(a, 0), _mm256_extractf128_si256(b, 0)); ++ __m128i hi = _mm_max_epi32(_mm256_extractf128_si256(a, 1), _mm256_extractf128_si256(b, 1)); ++ return _mm256_insertf128_si256(_mm256_castsi128_si256(lo), (hi), 1); ++#endif + } + + // Add specializations for min/max with prescribed NaN progation. +@@ -641,17 +653,25 @@ template<> EIGEN_STRONG_INLINE Packet8f ploaddup(const float* from) + // then we can perform a consistent permutation on the global register to get everything in shape: + return _mm256_permute_ps(tmp, _MM_SHUFFLE(3,3,2,2)); + } +-// Loads 2 doubles from memory a returns the packet {a0, a0 a1, a1} ++// Loads 2 doubles from memory a returns the packet {a0, a0, a1, a1} + template<> EIGEN_STRONG_INLINE Packet4d ploaddup(const double* from) + { + Packet4d tmp = _mm256_broadcast_pd((const __m128d*)(const void*)from); + return _mm256_permute_pd(tmp, 3<<2); + } +-// Loads 4 integers from memory a returns the packet {a0, a0 a1, a1, a2, a2, a3, a3} ++// Loads 4 integers from memory a returns the packet {a0, a0, a1, a1, a2, a2, a3, a3} + template<> EIGEN_STRONG_INLINE Packet8i ploaddup(const int* from) + { +- Packet8i a = _mm256_castsi128_si256(pload(from)); ++#ifdef EIGEN_VECTORIZE_AVX2 ++ const Packet8i a = _mm256_castsi128_si256(pload(from)); + return _mm256_permutevar8x32_epi32(a, _mm256_setr_epi32(0, 0, 1, 1, 2, 2, 3, 3)); ++#else ++ __m256 tmp = _mm256_broadcast_ps((const __m128*)(const void*)from); ++ // mimic an "inplace" permutation of the lower 128bits using a blend ++ tmp = _mm256_blend_ps(tmp,_mm256_castps128_ps256(_mm_permute_ps( _mm256_castps256_ps128(tmp), _MM_SHUFFLE(1,0,1,0))), 15); ++ // then we can perform a consistent permutation on the global register to get everything in shape: ++ return _mm256_castps_si256(_mm256_permute_ps(tmp, _MM_SHUFFLE(3,3,2,2))); ++#endif + } + + // Loads 2 floats from memory a returns the packet {a0, a0 a0, a0, a1, a1, a1, a1} +@@ -662,7 +682,7 @@ template<> EIGEN_STRONG_INLINE Packet8f ploadquad(const float* from) + } + template<> EIGEN_STRONG_INLINE Packet8i ploadquad(const int* from) + { +- return _mm256_inserti128_si256(_mm256_set1_epi32(*from), _mm_set1_epi32(*(from+1)), 1); ++ return _mm256_insertf128_si256(_mm256_set1_epi32(*from), _mm_set1_epi32(*(from+1)), 1); + } + + template<> EIGEN_STRONG_INLINE void pstore(float* to, const Packet8f& from) { EIGEN_DEBUG_ALIGNED_STORE _mm256_store_ps(to, from); } +@@ -723,13 +743,13 @@ template<> EIGEN_DEVICE_FUNC inline void pscatter(double* to, + } + template<> EIGEN_DEVICE_FUNC inline void pscatter(int* to, const Packet8i& from, Index stride) + { +- __m128i low = _mm256_extracti128_si256(from, 0); ++ __m128i low = _mm256_extractf128_si256(from, 0); + to[stride*0] = _mm_extract_epi32(low, 0); + to[stride*1] = _mm_extract_epi32(low, 1); + to[stride*2] = _mm_extract_epi32(low, 2); + to[stride*3] = _mm_extract_epi32(low, 3); + +- __m128i high = _mm256_extracti128_si256(from, 1); ++ __m128i high = _mm256_extractf128_si256(from, 1); + to[stride*4] = _mm_extract_epi32(high, 0); + to[stride*5] = _mm_extract_epi32(high, 1); + to[stride*6] = _mm_extract_epi32(high, 2); +@@ -803,7 +823,13 @@ template<> EIGEN_STRONG_INLINE Packet4d pabs(const Packet4d& a) + } + template<> EIGEN_STRONG_INLINE Packet8i pabs(const Packet8i& a) + { ++#ifdef EIGEN_VECTORIZE_AVX2 + return _mm256_abs_epi32(a); ++#else ++ __m128i lo = _mm_abs_epi32(_mm256_extractf128_si256(a, 0)); ++ __m128i hi = _mm_abs_epi32(_mm256_extractf128_si256(a, 1)); ++ return _mm256_insertf128_si256(_mm256_castsi128_si256(lo), (hi), 1); ++#endif + } + + template<> EIGEN_STRONG_INLINE Packet8f pfrexp(const Packet8f& a, Packet8f& exponent) { +@@ -989,16 +1015,27 @@ ptranspose(PacketBlock& kernel) { + #define MM256_SHUFFLE_EPI32(A, B, M) \ + _mm256_castps_si256(_mm256_shuffle_ps(_mm256_castsi256_ps(A), _mm256_castsi256_ps(B), M)) + ++#ifdef EIGEN_VECTORIZE_AVX2 ++#define MM256_UNPACKLO_EPI32(A, B) \ ++ _mm256_castps_si256(_mm256_unpacklo_ps(_mm256_castsi256_ps(A), _mm256_castsi256_ps(B))) ++#define MM256_UNPACKHI_EPI32(A, B) \ ++ _mm256_castps_si256(_mm256_unpackhi_ps(_mm256_castsi256_ps(A), _mm256_castsi256_ps(B))) ++#else ++#define MM256_UNPACKLO_EPI32(A, B) _mm256_unpacklo_ps(A, B) ++#define MM256_UNPACKHI_EPI32(A, B) _mm256_unpackhi_ps(A, B) ++#endif ++ ++ + EIGEN_DEVICE_FUNC inline void + ptranspose(PacketBlock& kernel) { +- __m256i T0 = _mm256_unpacklo_epi32(kernel.packet[0], kernel.packet[1]); +- __m256i T1 = _mm256_unpackhi_epi32(kernel.packet[0], kernel.packet[1]); +- __m256i T2 = _mm256_unpacklo_epi32(kernel.packet[2], kernel.packet[3]); +- __m256i T3 = _mm256_unpackhi_epi32(kernel.packet[2], kernel.packet[3]); +- __m256i T4 = _mm256_unpacklo_epi32(kernel.packet[4], kernel.packet[5]); +- __m256i T5 = _mm256_unpackhi_epi32(kernel.packet[4], kernel.packet[5]); +- __m256i T6 = _mm256_unpacklo_epi32(kernel.packet[6], kernel.packet[7]); +- __m256i T7 = _mm256_unpackhi_epi32(kernel.packet[6], kernel.packet[7]); ++ __m256i T0 = MM256_UNPACKLO_EPI32(kernel.packet[0], kernel.packet[1]); ++ __m256i T1 = MM256_UNPACKHI_EPI32(kernel.packet[0], kernel.packet[1]); ++ __m256i T2 = MM256_UNPACKLO_EPI32(kernel.packet[2], kernel.packet[3]); ++ __m256i T3 = MM256_UNPACKHI_EPI32(kernel.packet[2], kernel.packet[3]); ++ __m256i T4 = MM256_UNPACKLO_EPI32(kernel.packet[4], kernel.packet[5]); ++ __m256i T5 = MM256_UNPACKHI_EPI32(kernel.packet[4], kernel.packet[5]); ++ __m256i T6 = MM256_UNPACKLO_EPI32(kernel.packet[6], kernel.packet[7]); ++ __m256i T7 = MM256_UNPACKHI_EPI32(kernel.packet[6], kernel.packet[7]); + __m256i S0 = MM256_SHUFFLE_EPI32(T0,T2,_MM_SHUFFLE(1,0,1,0)); + __m256i S1 = MM256_SHUFFLE_EPI32(T0,T2,_MM_SHUFFLE(3,2,3,2)); + __m256i S2 = MM256_SHUFFLE_EPI32(T1,T3,_MM_SHUFFLE(1,0,1,0)); +@@ -1019,10 +1056,10 @@ ptranspose(PacketBlock& kernel) { + + EIGEN_DEVICE_FUNC inline void + ptranspose(PacketBlock& kernel) { +- __m256i T0 = _mm256_unpacklo_epi32(kernel.packet[0], kernel.packet[1]); +- __m256i T1 = _mm256_unpackhi_epi32(kernel.packet[0], kernel.packet[1]); +- __m256i T2 = _mm256_unpacklo_epi32(kernel.packet[2], kernel.packet[3]); +- __m256i T3 = _mm256_unpackhi_epi32(kernel.packet[2], kernel.packet[3]); ++ __m256i T0 = MM256_UNPACKLO_EPI32(kernel.packet[0], kernel.packet[1]); ++ __m256i T1 = MM256_UNPACKHI_EPI32(kernel.packet[0], kernel.packet[1]); ++ __m256i T2 = MM256_UNPACKLO_EPI32(kernel.packet[2], kernel.packet[3]); ++ __m256i T3 = MM256_UNPACKHI_EPI32(kernel.packet[2], kernel.packet[3]); + + __m256i S0 = MM256_SHUFFLE_EPI32(T0,T2,_MM_SHUFFLE(1,0,1,0)); + __m256i S1 = MM256_SHUFFLE_EPI32(T0,T2,_MM_SHUFFLE(3,2,3,2)); +diff --git a/third_party/eigen3/src/Eigen/src/Core/arch/AVX512/PacketMath.h b/third_party/eigen3/src/Eigen/src/Core/arch/AVX512/PacketMath.h +index 6ce15c677..0810f66ee 100644 +--- a/third_party/eigen3/src/Eigen/src/Core/arch/AVX512/PacketMath.h ++++ b/third_party/eigen3/src/Eigen/src/Core/arch/AVX512/PacketMath.h +@@ -1028,7 +1028,7 @@ template<> EIGEN_STRONG_INLINE Packet8d pldexp(const Packet8d& a, cons + + // AVX512F does not define _mm512_extracti32x8_epi32 to extract _m256i from _m512i + #define EIGEN_EXTRACT_8i_FROM_16i(INPUT, OUTPUT) \ +- __m256i OUTPUT##_0 = _mm512_extracti32x8_epi32(INPUT, 0) \ ++ __m256i OUTPUT##_0 = _mm512_extracti32x8_epi32(INPUT, 0); \ + __m256i OUTPUT##_1 = _mm512_extracti32x8_epi32(INPUT, 1) + #else + #define EIGEN_EXTRACT_8f_FROM_16f(INPUT, OUTPUT) \ +@@ -1037,7 +1037,7 @@ template<> EIGEN_STRONG_INLINE Packet8d pldexp(const Packet8d& a, cons + _mm512_extractf32x4_ps(INPUT, 1), 1); \ + __m256 OUTPUT##_1 = _mm256_insertf128_ps( \ + _mm256_castps128_ps256(_mm512_extractf32x4_ps(INPUT, 2)), \ +- _mm512_extractf32x4_ps(INPUT, 3), 1); ++ _mm512_extractf32x4_ps(INPUT, 3), 1) + + #define EIGEN_EXTRACT_8i_FROM_16i(INPUT, OUTPUT) \ + __m256i OUTPUT##_0 = _mm256_insertf128_si256( \ +@@ -1045,7 +1045,7 @@ template<> EIGEN_STRONG_INLINE Packet8d pldexp(const Packet8d& a, cons + _mm512_extracti32x4_epi32(INPUT, 1), 1); \ + __m256i OUTPUT##_1 = _mm256_insertf128_si256( \ + _mm256_castsi128_si256(_mm512_extracti32x4_epi32(INPUT, 2)), \ +- _mm512_extracti32x4_epi32(INPUT, 3), 1); ++ _mm512_extracti32x4_epi32(INPUT, 3), 1) + #endif + + #ifdef EIGEN_VECTORIZE_AVX512DQ +-- +GitLab + diff --git a/chromium-95-eigen-avx-2.patch b/chromium-95-eigen-avx-2.patch new file mode 100644 index 00000000..1cb8007b --- /dev/null +++ b/chromium-95-eigen-avx-2.patch @@ -0,0 +1,30 @@ +From def145547fc6abd14236e103b9443a36064f664f Mon Sep 17 00:00:00 2001 +From: Antonio Sanchez +Date: Thu, 2 Sep 2021 16:21:07 -0700 +Subject: [PATCH] Add missing packet types in pset1 call. + +Oops, introduced this when "fixing" integer packets. +--- + Eigen/src/Core/arch/AVX/PacketMath.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/third_party/eigen3/src/Eigen/src/Core/arch/AVX/PacketMath.h b/third_party/eigen3/src/Eigen/src/Core/arch/AVX/PacketMath.h +index 247ee4efd..8da9031dc 100644 +--- a/third_party/eigen3/src/Eigen/src/Core/arch/AVX/PacketMath.h ++++ b/third_party/eigen3/src/Eigen/src/Core/arch/AVX/PacketMath.h +@@ -274,9 +274,9 @@ template<> EIGEN_STRONG_INLINE Packet8i padd(const Packet8i& a, const + #endif + } + +-template<> EIGEN_STRONG_INLINE Packet8f plset(const float& a) { return padd(pset1(a), _mm256_set_ps(7.0,6.0,5.0,4.0,3.0,2.0,1.0,0.0)); } +-template<> EIGEN_STRONG_INLINE Packet4d plset(const double& a) { return padd(pset1(a), _mm256_set_pd(3.0,2.0,1.0,0.0)); } +-template<> EIGEN_STRONG_INLINE Packet8i plset(const int& a) { return padd(pset1(a), _mm256_set_epi32(7,6,5,4,3,2,1,0)); } ++template<> EIGEN_STRONG_INLINE Packet8f plset(const float& a) { return padd(pset1(a), _mm256_set_ps(7.0,6.0,5.0,4.0,3.0,2.0,1.0,0.0)); } ++template<> EIGEN_STRONG_INLINE Packet4d plset(const double& a) { return padd(pset1(a), _mm256_set_pd(3.0,2.0,1.0,0.0)); } ++template<> EIGEN_STRONG_INLINE Packet8i plset(const int& a) { return padd(pset1(a), _mm256_set_epi32(7,6,5,4,3,2,1,0)); } + + template<> EIGEN_STRONG_INLINE Packet8f psub(const Packet8f& a, const Packet8f& b) { return _mm256_sub_ps(a,b); } + template<> EIGEN_STRONG_INLINE Packet4d psub(const Packet4d& a, const Packet4d& b) { return _mm256_sub_pd(a,b); } +-- +GitLab + diff --git a/chromium-95-eigen-avx-3.patch b/chromium-95-eigen-avx-3.patch new file mode 100644 index 00000000..44e9ef4e --- /dev/null +++ b/chromium-95-eigen-avx-3.patch @@ -0,0 +1,44 @@ +From 7792b1e909a98703181aecb8810b4b654004c25d Mon Sep 17 00:00:00 2001 +From: Antonio Sanchez +Date: Fri, 3 Sep 2021 10:41:35 -0700 +Subject: [PATCH] Fix AVX2 PacketMath.h. + +There were a couple typos ps -> epi32, and an unaligned load issue. +--- + Eigen/src/Core/arch/AVX/PacketMath.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/third_party/eigen3/src/Eigen/src/Core/arch/AVX/PacketMath.h b/third_party/eigen3/src/Eigen/src/Core/arch/AVX/PacketMath.h +index 8da9031dc..41cb7af9c 100644 +--- a/third_party/eigen3/src/Eigen/src/Core/arch/AVX/PacketMath.h ++++ b/third_party/eigen3/src/Eigen/src/Core/arch/AVX/PacketMath.h +@@ -663,7 +663,7 @@ template<> EIGEN_STRONG_INLINE Packet4d ploaddup(const double* from) + template<> EIGEN_STRONG_INLINE Packet8i ploaddup(const int* from) + { + #ifdef EIGEN_VECTORIZE_AVX2 +- const Packet8i a = _mm256_castsi128_si256(pload(from)); ++ const Packet8i a = _mm256_castsi128_si256(ploadu(from)); + return _mm256_permutevar8x32_epi32(a, _mm256_setr_epi32(0, 0, 1, 1, 2, 2, 3, 3)); + #else + __m256 tmp = _mm256_broadcast_ps((const __m128*)(const void*)from); +@@ -1015,14 +1015,14 @@ ptranspose(PacketBlock& kernel) { + #define MM256_SHUFFLE_EPI32(A, B, M) \ + _mm256_castps_si256(_mm256_shuffle_ps(_mm256_castsi256_ps(A), _mm256_castsi256_ps(B), M)) + +-#ifdef EIGEN_VECTORIZE_AVX2 ++#ifndef EIGEN_VECTORIZE_AVX2 + #define MM256_UNPACKLO_EPI32(A, B) \ + _mm256_castps_si256(_mm256_unpacklo_ps(_mm256_castsi256_ps(A), _mm256_castsi256_ps(B))) + #define MM256_UNPACKHI_EPI32(A, B) \ + _mm256_castps_si256(_mm256_unpackhi_ps(_mm256_castsi256_ps(A), _mm256_castsi256_ps(B))) + #else +-#define MM256_UNPACKLO_EPI32(A, B) _mm256_unpacklo_ps(A, B) +-#define MM256_UNPACKHI_EPI32(A, B) _mm256_unpackhi_ps(A, B) ++#define MM256_UNPACKLO_EPI32(A, B) _mm256_unpacklo_epi32(A, B) ++#define MM256_UNPACKHI_EPI32(A, B) _mm256_unpackhi_epi32(A, B) + #endif + + +-- +GitLab + diff --git a/chromium-95-libyuv-aarch64.patch b/chromium-95-libyuv-aarch64.patch new file mode 100644 index 00000000..b2143560 --- /dev/null +++ b/chromium-95-libyuv-aarch64.patch @@ -0,0 +1,30 @@ +diff --git a/third_party/libyuv/source/row_neon64.cc b/third_party/libyuv/source/row_neon64.cc +index 350c964..2aab413 100644 +--- a/third_party/libyuv/source/row_neon64.cc ++++ b/third_party/libyuv/source/row_neon64.cc +@@ -1835,7 +1835,7 @@ void ARGBToAB64Row_NEON(const uint8_t* src_argb, + : "+r"(src_argb), // %0 + "+r"(dst_ab64), // %1 + "+r"(width) // %2 +- : "m"(kShuffleARGBToABGR) // %3 ++ : "Q"(kShuffleARGBToABGR) // %3 + : "cc", "memory", "v0", "v1", "v2", "v3", "v4"); + } + +@@ -1859,7 +1859,7 @@ void AR64ToARGBRow_NEON(const uint16_t* src_ar64, + : "+r"(src_ar64), // %0 + "+r"(dst_argb), // %1 + "+r"(width) // %2 +- : "m"(kShuffleAR64ToARGB) // %3 ++ : "Q"(kShuffleAR64ToARGB) // %3 + : "cc", "memory", "v0", "v1", "v2", "v3", "v4"); + } + +@@ -1883,7 +1883,7 @@ void AB64ToARGBRow_NEON(const uint16_t* src_ab64, + : "+r"(src_ab64), // %0 + "+r"(dst_argb), // %1 + "+r"(width) // %2 +- : "m"(kShuffleAB64ToARGB) // %3 ++ : "Q"(kShuffleAB64ToARGB) // %3 + : "cc", "memory", "v0", "v1", "v2", "v3", "v4"); + } diff --git a/chromium-95-libyuv-arm.patch b/chromium-95-libyuv-arm.patch new file mode 100644 index 00000000..25a8cdb8 --- /dev/null +++ b/chromium-95-libyuv-arm.patch @@ -0,0 +1,13 @@ +diff --git a/third_party/libyuv/source/row_neon.cc b/third_party/libyuv/source/row_neon.cc +index 6ef6f1c..e4a9e1e 100644 +--- a/third_party/libyuv/source/row_neon.cc ++++ b/third_party/libyuv/source/row_neon.cc +@@ -2346,7 +2346,7 @@ void ARGBToAB64Row_NEON(const uint8_t* src_argb, + uint16_t* dst_ab64, + int width) { + asm volatile( +- "vld1.8 q4, %3 \n" // shuffler ++ "vld1.8 {d8, d9}, %3 \n" // shuffler + "1: \n" + "vld1.8 {q0}, [%0]! \n" + "vld1.8 {q2}, [%0]! \n" diff --git a/chromium-95-maldoca-zlib.patch b/chromium-95-maldoca-zlib.patch new file mode 100644 index 00000000..1f64a66d --- /dev/null +++ b/chromium-95-maldoca-zlib.patch @@ -0,0 +1,13 @@ +diff --git a/third_party/maldoca/BUILD.gn b/third_party/maldoca/BUILD.gn +index eeab205..29a0a2c 100644 +--- a/third_party/maldoca/BUILD.gn ++++ b/third_party/maldoca/BUILD.gn +@@ -224,7 +224,7 @@ source_set("maldoca-ole") { + "//third_party/libxml", + "//third_party/protobuf:protobuf_lite", + "//third_party/re2", +- "//third_party/zlib:zlib_common_headers", ++ "//third_party/zlib:zlib", + "//third_party/zlib/google:zip", + ] + diff --git a/chromium-95-quiche-include.patch b/chromium-95-quiche-include.patch new file mode 100644 index 00000000..4bbd45cf --- /dev/null +++ b/chromium-95-quiche-include.patch @@ -0,0 +1,25 @@ +From a9d986203bcfbaab84f270c1dc6c3abb4c450ee1 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Fri, 17 Sep 2021 14:57:33 +0000 +Subject: [PATCH] IWYU: add stddef.h for size_t in WindowManager + +--- + net/third_party/quiche/src/http2/adapter/window_manager.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/net/third_party/quiche/src/http2/adapter/window_manager.h b/net/third_party/quiche/src/http2/adapter/window_manager.h +index f15982d..5a7701e 100644 +--- a/net/third_party/quiche/src/http2/adapter/window_manager.h ++++ b/net/third_party/quiche/src/http2/adapter/window_manager.h +@@ -1,6 +1,8 @@ + #ifndef QUICHE_HTTP2_ADAPTER_WINDOW_MANAGER_H_ + #define QUICHE_HTTP2_ADAPTER_WINDOW_MANAGER_H_ + ++#include ++ + #include + + #include "common/platform/api/quiche_export.h" +-- +2.32.0 + diff --git a/chromium-95-xfce-maximize.patch b/chromium-95-xfce-maximize.patch new file mode 100644 index 00000000..296d9787 --- /dev/null +++ b/chromium-95-xfce-maximize.patch @@ -0,0 +1,30 @@ +From 603d765ca5154db27718d89a2ee9be2a95a64254 Mon Sep 17 00:00:00 2001 +From: Alexander Dunaev +Date: Fri, 29 Oct 2021 20:54:46 +0700 +Subject: [PATCH] [linux/xfce] Set zero insets on maximising the window. + +It turned out that Xfwm handles the frame insets not the way KWin and +Mutter do. + +Bug: 1260821 +Change-Id: I69e71049157c03b74d78bc5edb7a60bf39cdda8b +--- + +diff --git a/ui/platform_window/x11/x11_window.cc b/ui/platform_window/x11/x11_window.cc +index dd381747..706f19c 100644 +--- a/ui/platform_window/x11/x11_window.cc ++++ b/ui/platform_window/x11/x11_window.cc +@@ -676,6 +676,13 @@ + // save this one for later too. + should_maximize_after_map_ = !window_mapped_in_client_; + ++ // Some WMs keep respecting the frame extents even if the window is maximised. ++ // Remove the insets when maximising. The extents will be set again when the ++ // window is restored to normal state. ++ // See https://crbug.com/1260821 ++ if (CanSetDecorationInsets()) ++ SetDecorationInsets(nullptr); ++ + SetWMSpecState(true, x11::GetAtom("_NET_WM_STATE_MAXIMIZED_VERT"), + x11::GetAtom("_NET_WM_STATE_MAXIMIZED_HORZ")); + } diff --git a/chromium-95.0.4638.69-missing-cstring.patch b/chromium-95.0.4638.69-missing-cstring.patch new file mode 100644 index 00000000..bb0747fc --- /dev/null +++ b/chromium-95.0.4638.69-missing-cstring.patch @@ -0,0 +1,57 @@ +diff -up chromium-95.0.4638.69/net/base/test_data_stream.cc.missing-cstring chromium-95.0.4638.69/net/base/test_data_stream.cc +--- chromium-95.0.4638.69/net/base/test_data_stream.cc.missing-cstring 2021-11-14 16:04:59.911270740 +0000 ++++ chromium-95.0.4638.69/net/base/test_data_stream.cc 2021-11-14 16:04:59.881272143 +0000 +@@ -5,6 +5,7 @@ + #include "net/base/test_data_stream.h" + + #include ++#include + + namespace net { + +diff -up chromium-95.0.4638.69/net/filter/filter_source_stream_test_util.cc.missing-cstring chromium-95.0.4638.69/net/filter/filter_source_stream_test_util.cc +--- chromium-95.0.4638.69/net/filter/filter_source_stream_test_util.cc.missing-cstring 2021-11-15 15:54:35.895963882 +0000 ++++ chromium-95.0.4638.69/net/filter/filter_source_stream_test_util.cc 2021-11-15 15:54:50.342288149 +0000 +@@ -4,6 +4,8 @@ + + #include "net/filter/filter_source_stream_test_util.h" + ++#include ++ + #include "base/bit_cast.h" + #include "base/check_op.h" + #include "third_party/zlib/zlib.h" +diff -up chromium-95.0.4638.69/third_party/webrtc/audio/utility/channel_mixer.cc.missing-cstring chromium-95.0.4638.69/third_party/webrtc/audio/utility/channel_mixer.cc +--- chromium-95.0.4638.69/third_party/webrtc/audio/utility/channel_mixer.cc.missing-cstring 2021-11-14 16:05:24.613116022 +0000 ++++ chromium-95.0.4638.69/third_party/webrtc/audio/utility/channel_mixer.cc 2021-11-14 16:05:24.614115975 +0000 +@@ -8,6 +8,8 @@ + * be found in the AUTHORS file in the root of the source tree. + */ + ++#include ++ + #include "audio/utility/channel_mixer.h" + + #include "audio/utility/channel_mixing_matrix.h" +diff -up chromium-95.0.4638.69/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc.missing-cstring chromium-95.0.4638.69/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc +--- chromium-95.0.4638.69/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc.missing-cstring 2021-11-14 16:05:24.095140235 +0000 ++++ chromium-95.0.4638.69/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc 2021-11-14 16:05:24.095140235 +0000 +@@ -19,6 +19,7 @@ + #include + #include + ++#include + #include + #include + +diff -up chromium-95.0.4638.69/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-cstring chromium-95.0.4638.69/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc +--- chromium-95.0.4638.69/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-cstring 2021-11-14 16:05:23.794154305 +0000 ++++ chromium-95.0.4638.69/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc 2021-11-14 16:05:23.792154399 +0000 +@@ -10,6 +10,7 @@ + + #include "modules/video_coding/utility/ivf_file_reader.h" + ++#include + #include + #include + diff --git a/chromium-95.0.4638.69-norar.patch b/chromium-95.0.4638.69-norar.patch new file mode 100644 index 00000000..ee8c255d --- /dev/null +++ b/chromium-95.0.4638.69-norar.patch @@ -0,0 +1,90 @@ +diff -up chromium-95.0.4638.69/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-95.0.4638.69/chrome/common/safe_browsing/BUILD.gn +--- chromium-95.0.4638.69/chrome/common/safe_browsing/BUILD.gn.nounrar 2021-10-28 23:07:12.000000000 -0400 ++++ chromium-95.0.4638.69/chrome/common/safe_browsing/BUILD.gn 2021-11-12 11:33:52.691346496 -0500 +@@ -58,39 +58,6 @@ if (safe_browsing_mode == 1) { + public_deps = [ "//components/safe_browsing/core/common/proto:csd_proto" ] + } + +- source_set("rar_analyzer") { +- sources = [ +- "rar_analyzer.cc", +- "rar_analyzer.h", +- ] +- +- deps = [ +- ":archive_analyzer_results", +- ":download_type_util", +- "//base", +- "//base:i18n", +- "//components/safe_browsing/content/common:file_type_policies", +- "//components/safe_browsing/core/common", +- "//third_party/unrar:unrar", +- ] +- +- defines = [ +- "_FILE_OFFSET_BITS=64", +- "LARGEFILE_SOURCE", +- "RAR_SMP", +- "SILENT", +- +- # The following is set to disable certain macro definitions in the unrar +- # source code. +- "CHROMIUM_UNRAR", +- +- # Disables exceptions in unrar, replaces them with process termination. +- "UNRAR_NO_EXCEPTIONS", +- ] +- +- public_deps = [ "//components/safe_browsing/core/common/proto:csd_proto" ] +- } +- + if (is_linux || is_win) { + source_set("document_analyzer") { + sources = [ +@@ -189,7 +156,6 @@ source_set("safe_browsing") { + ":archive_analyzer_results", + ":binary_feature_extractor", + ":download_type_util", +- ":rar_analyzer", + "//components/safe_browsing/core/common", + ] + +diff -up chromium-95.0.4638.69/chrome/common/safe_browsing/DEPS.nounrar chromium-95.0.4638.69/chrome/common/safe_browsing/DEPS +--- chromium-95.0.4638.69/chrome/common/safe_browsing/DEPS.nounrar 2021-11-12 11:30:02.629954310 -0500 ++++ chromium-95.0.4638.69/chrome/common/safe_browsing/DEPS 2021-11-12 11:34:16.732491978 -0500 +@@ -3,6 +3,5 @@ include_rules = [ + "+components/safe_browsing/core/common", + "+third_party/maldoca", + "+third_party/protobuf", +- "+third_party/unrar", + "+third_party/zlib", + ] +diff -up chromium-95.0.4638.69/chrome/services/file_util/BUILD.gn.nounrar chromium-95.0.4638.69/chrome/services/file_util/BUILD.gn +--- chromium-95.0.4638.69/chrome/services/file_util/BUILD.gn.nounrar 2021-11-12 11:30:02.629954310 -0500 ++++ chromium-95.0.4638.69/chrome/services/file_util/BUILD.gn 2021-11-12 11:36:08.277168386 -0500 +@@ -60,7 +60,6 @@ source_set("file_util") { + deps += [ + "//chrome/common/safe_browsing", + "//chrome/common/safe_browsing:archive_analyzer_results", +- "//chrome/common/safe_browsing:rar_analyzer", + ] + + if (is_linux || is_win) { +diff -up chromium-95.0.4638.69/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-95.0.4638.69/chrome/services/file_util/safe_archive_analyzer.cc +--- chromium-95.0.4638.69/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2021-10-28 23:07:12.000000000 -0400 ++++ chromium-95.0.4638.69/chrome/services/file_util/safe_archive_analyzer.cc 2021-11-12 11:30:02.630954316 -0500 +@@ -45,10 +45,14 @@ void SafeArchiveAnalyzer::AnalyzeDmgFile + void SafeArchiveAnalyzer::AnalyzeRarFile(base::File rar_file, + base::File temporary_file, + AnalyzeRarFileCallback callback) { ++#if 0 + DCHECK(rar_file.IsValid()); + + safe_browsing::ArchiveAnalyzerResults results; + safe_browsing::rar_analyzer::AnalyzeRarFile( + std::move(rar_file), std::move(temporary_file), &results); + std::move(callback).Run(results); ++#else ++ NOTREACHED(); ++#endif + } diff --git a/chromium-96-CommandLine-include.patch b/chromium-96-CommandLine-include.patch new file mode 100644 index 00000000..2d7b7e90 --- /dev/null +++ b/chromium-96-CommandLine-include.patch @@ -0,0 +1,24 @@ +From 39e6e77798d86033e5eb1fb2a2caf20a5bca2262 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Sat, 9 Oct 2021 08:27:04 +0000 +Subject: [PATCH] IWYU: add memory for std::unique_ptr in base::CommandLine + +--- + base/command_line.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/base/command_line.h b/base/command_line.h +index 706726a..ad02812 100644 +--- a/base/command_line.h ++++ b/base/command_line.h +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + +-- +2.32.0 + diff --git a/chromium-96-CouponDB-include.patch b/chromium-96-CouponDB-include.patch new file mode 100644 index 00000000..41acfb31 --- /dev/null +++ b/chromium-96-CouponDB-include.patch @@ -0,0 +1,25 @@ +From 3a7b8dd0fcceffcfd0ea7e3186d2850deed7a00b Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Wed, 6 Oct 2021 15:36:47 +0000 +Subject: [PATCH] IWYU: add vector for std::vector in CouponDB + +--- + chrome/browser/commerce/coupons/coupon_db.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/chrome/browser/commerce/coupons/coupon_db.h b/chrome/browser/commerce/coupons/coupon_db.h +index f0758f4..93e2dd3 100644 +--- a/chrome/browser/commerce/coupons/coupon_db.h ++++ b/chrome/browser/commerce/coupons/coupon_db.h +@@ -5,6 +5,8 @@ + #ifndef CHROME_BROWSER_COMMERCE_COUPONS_COUPON_DB_H_ + #define CHROME_BROWSER_COMMERCE_COUPONS_COUPON_DB_H_ + ++#include ++ + #include "base/callback_helpers.h" + #include "base/memory/weak_ptr.h" + #include "url/gurl.h" +-- +2.32.0 + diff --git a/chromium-96-DrmRenderNodePathFinder-include.patch b/chromium-96-DrmRenderNodePathFinder-include.patch new file mode 100644 index 00000000..fd44eb2c --- /dev/null +++ b/chromium-96-DrmRenderNodePathFinder-include.patch @@ -0,0 +1,24 @@ +From 9e36b3c28935fb50d43ccef443be786a8e3f8a5f Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Sat, 9 Oct 2021 16:17:34 +0000 +Subject: [PATCH] IWYU: add string.h for memcmp in ui:: DrmRenderNodePathFinder + +--- + ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc b/ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc +index 06776a7..d5b7b71 100644 +--- a/ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc ++++ b/ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc +@@ -5,6 +5,7 @@ + #include "ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.h" + + #include ++#include + #include + #include + #include +-- +2.32.0 + diff --git a/chromium-96-EnumTable-crash.patch b/chromium-96-EnumTable-crash.patch new file mode 100644 index 00000000..9736739c --- /dev/null +++ b/chromium-96-EnumTable-crash.patch @@ -0,0 +1,76 @@ +diff --git a/components/cast_channel/enum_table.h b/components/cast_channel/enum_table.h +index aad9e08..2f3fcad 100644 +--- a/components/cast_channel/enum_table.h ++++ b/components/cast_channel/enum_table.h +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + #include "base/check_op.h" + #include "base/macros.h" +@@ -188,7 +189,6 @@ class + inline constexpr GenericEnumTableEntry(int32_t value); + inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str); + +- GenericEnumTableEntry(const GenericEnumTableEntry&) = delete; + GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete; + + private: +@@ -254,7 +254,6 @@ class EnumTable { + constexpr Entry(E value, base::StringPiece str) + : GenericEnumTableEntry(static_cast(value), str) {} + +- Entry(const Entry&) = delete; + Entry& operator=(const Entry&) = delete; + }; + +@@ -313,15 +312,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 +@@ -349,8 +347,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(); + } + +@@ -365,7 +362,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) +@@ -377,8 +374,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/chromium-96-RestrictedCookieManager-tuple.patch b/chromium-96-RestrictedCookieManager-tuple.patch new file mode 100644 index 00000000..cbdca44b --- /dev/null +++ b/chromium-96-RestrictedCookieManager-tuple.patch @@ -0,0 +1,31 @@ +From 86b1886673c3e75d3a7b8c802b3e9fa6ea945a1e Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz +Date: Fri, 08 Oct 2021 06:32:55 +0000 +Subject: [PATCH] libstdc++: no implicit conversion from tuple created with std::tie to an std::pair in restricted cookie manager. + +Fix compilation error: + ../../services/network/restricted_cookie_manager.cc:164:30: error: no match for ‘operator[]’ (operand types are ‘network::CookieAccessesByURLAndSite’ {aka ‘std::map, std::unique_ptr > >’} and ‘std::tuple’) + +There is no conversion from tuple to pair. + +Bug: 957519 +Change-Id: Idf29c7b21895ae28f45b35d6193ab4ac555945c8 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3211752 +Reviewed-by: Robbie McElrath +Commit-Queue: José Dapena Paz +Cr-Commit-Position: refs/heads/main@{#929597} +--- + +diff --git a/services/network/restricted_cookie_manager.cc b/services/network/restricted_cookie_manager.cc +index 425426f..c8c10c6 100644 +--- a/services/network/restricted_cookie_manager.cc ++++ b/services/network/restricted_cookie_manager.cc +@@ -161,7 +161,7 @@ + const GURL& url, + const net::SiteForCookies& site_for_cookies) { + std::unique_ptr& entry = +- recent_cookie_accesses_[std::tie(url, site_for_cookies)]; ++ recent_cookie_accesses_[std::make_pair(url, site_for_cookies)]; + if (!entry) { + entry = std::make_unique(); + } diff --git a/chromium-96-xfce-maximize.patch b/chromium-96-xfce-maximize.patch new file mode 100644 index 00000000..77cf410c --- /dev/null +++ b/chromium-96-xfce-maximize.patch @@ -0,0 +1,51 @@ +From 245e71ae8de3f4b5f3478739be819981bb12dfab Mon Sep 17 00:00:00 2001 +From: Alexander Dunaev +Date: Sat, 13 Nov 2021 06:35:35 +0000 +Subject: [PATCH] [linux/xfce] Introduced a hack for Xfwm. + +This proposes an alternative to [1]. Either this patch or that one +should be landed, but not both. See the linked crbug for the details. + +Setting the frame extents via the _GTK_FRAME_EXTENTS property turned out +to be problematic at Xfwm. While the issue is agreed to be a bug in the +window manager, for now we disable setting the frame extents on that WM. + +This patch introduces a logic that disables setting the window property +on Xfwm. + +[1] https://chromium-review.googlesource.com/c/chromium/src/+/3275653 + +Bug: 1260821 +Change-Id: I4b734ac0dc2b97d7ed6b1842564a33ec6e4b4035 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3275272 +Reviewed-by: Thomas Anderson +Commit-Queue: Alexander Dunaev +Cr-Commit-Position: refs/heads/main@{#941444} +--- + +diff --git a/ui/platform_window/x11/x11_window.cc b/ui/platform_window/x11/x11_window.cc +index 2b20835..4fa2992 100644 +--- a/ui/platform_window/x11/x11_window.cc ++++ b/ui/platform_window/x11/x11_window.cc +@@ -1016,6 +1016,21 @@ + } + + bool X11Window::CanSetDecorationInsets() const { ++ // Xfwm handles _GTK_FRAME_EXTENTS a bit unexpected way. That is a known bug ++ // that will be eventually fixed, but for now we have to disable the function ++ // for Xfce. The block below should be removed when Xfwm is updated with the ++ // fix and is known to work properly. ++ // See https://crbug.com/1260821. ++ { ++ static WindowManagerName wm_name = WM_OTHER; ++ static bool checked_for_wm = false; ++ if (!checked_for_wm) { ++ wm_name = GuessWindowManager(); ++ checked_for_wm = true; ++ } ++ if (wm_name == WM_XFWM4) ++ return false; ++ } + return ui::WmSupportsHint(x11::GetAtom("_GTK_FRAME_EXTENTS")); + } + diff --git a/chromium-96.0.4664.110-enable-WebRTCPipeWireCapturer-byDefault.patch b/chromium-96.0.4664.110-enable-WebRTCPipeWireCapturer-byDefault.patch new file mode 100644 index 00000000..9d22e71f --- /dev/null +++ b/chromium-96.0.4664.110-enable-WebRTCPipeWireCapturer-byDefault.patch @@ -0,0 +1,12 @@ +diff -up chromium-96.0.4664.110/content/public/common/content_features.cc.enable-WebRTCPipeWireCapturer-byDefault chromium-96.0.4664.110/content/public/common/content_features.cc +--- chromium-96.0.4664.110/content/public/common/content_features.cc.enable-WebRTCPipeWireCapturer-byDefault 2021-12-20 11:24:28.862940185 -0500 ++++ chromium-96.0.4664.110/content/public/common/content_features.cc 2021-12-20 11:24:43.397027114 -0500 +@@ -1125,7 +1125,7 @@ const base::Feature kAuraWindowSubtreeCa + // Controls whether the PipeWire support for screen capturing is enabled on the + // Wayland display server. + const base::Feature kWebRtcPipeWireCapturer{"WebRTCPipeWireCapturer", +- base::FEATURE_DISABLED_BY_DEFAULT}; ++ base::FEATURE_ENABLED_BY_DEFAULT}; + #endif // defined(WEBRTC_USE_PIPEWIRE) + + enum class VideoCaptureServiceConfiguration { diff --git a/chromium-96.0.4664.45-gcc-remoting-constexpr.patch b/chromium-96.0.4664.45-gcc-remoting-constexpr.patch new file mode 100644 index 00000000..824155e3 --- /dev/null +++ b/chromium-96.0.4664.45-gcc-remoting-constexpr.patch @@ -0,0 +1,25 @@ +diff -up chromium-96.0.4664.45/remoting/signaling/message_tracker.cc.gcc-remoting-constexpr chromium-96.0.4664.45/remoting/signaling/message_tracker.cc +--- chromium-96.0.4664.45/remoting/signaling/message_tracker.cc.gcc-remoting-constexpr 2021-11-19 16:53:23.197177348 -0500 ++++ chromium-96.0.4664.45/remoting/signaling/message_tracker.cc 2021-11-19 17:03:16.354910826 -0500 +@@ -9,7 +9,7 @@ + namespace remoting { + + // static +-const base::TimeDelta MessageTracker::kCleanupInterval = base::Minutes(2); ++constexpr base::TimeDelta MessageTracker::kCleanupInterval; + + MessageTracker::MessageTracker() = default; + +diff -up chromium-96.0.4664.45/remoting/signaling/message_tracker.h.gcc-remoting-constexpr chromium-96.0.4664.45/remoting/signaling/message_tracker.h +--- chromium-96.0.4664.45/remoting/signaling/message_tracker.h.gcc-remoting-constexpr 2021-11-12 05:24:33.000000000 -0500 ++++ chromium-96.0.4664.45/remoting/signaling/message_tracker.h 2021-11-19 17:03:00.112809836 -0500 +@@ -40,7 +40,8 @@ class MessageTracker final { + + // All IDs older than now - kCleanupInterval will be eventually removed, but + // they are not guaranteed to be immediately removed after the interval. +- static const base::TimeDelta kCleanupInterval; ++ static constexpr base::TimeDelta kCleanupInterval = ++ base::Minutes(2); + + void RemoveExpiredIds(); + diff --git a/chromium-96.0.4664.45-missing-cstdint-header.patch b/chromium-96.0.4664.45-missing-cstdint-header.patch new file mode 100644 index 00000000..fe4e5dd5 --- /dev/null +++ b/chromium-96.0.4664.45-missing-cstdint-header.patch @@ -0,0 +1,35 @@ +diff -up chromium-96.0.4664.45/third_party/webrtc/common_video/h264/pps_parser.h.missing-cstdint chromium-96.0.4664.45/third_party/webrtc/common_video/h264/pps_parser.h +diff -up chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h.missing-cstdint chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h +--- chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h.missing-cstdint 2021-11-19 17:05:31.379750350 -0500 ++++ chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h 2021-11-19 17:07:35.191520127 -0500 +@@ -11,6 +11,7 @@ + #ifndef COMMON_VIDEO_H264_SPS_PARSER_H_ + #define COMMON_VIDEO_H264_SPS_PARSER_H_ + ++#include + #include "absl/types/optional.h" + #include "rtc_base/bitstream_reader.h" + +diff -up chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h.missing-cstdint chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h +--- chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h.missing-cstdint 2021-11-12 05:28:10.000000000 -0500 ++++ chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h 2021-11-19 17:05:31.379750350 -0500 +@@ -11,6 +11,7 @@ + #ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_ + #define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_ + ++#include + #include + + #include "absl/types/optional.h" +diff -up chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h.missing-cstdint chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h +--- chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h.missing-cstdint 2021-11-12 05:25:24.000000000 -0500 ++++ chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h 2021-11-19 17:05:31.379750350 -0500 +@@ -9,6 +9,8 @@ + + #include "ui/gfx/buffer_types.h" + ++#include ++ + namespace ui { + + int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format); diff --git a/chromium-96.0.4664.45-missing-cstring.patch b/chromium-96.0.4664.45-missing-cstring.patch new file mode 100644 index 00000000..5a5fa2f9 --- /dev/null +++ b/chromium-96.0.4664.45-missing-cstring.patch @@ -0,0 +1,24 @@ +diff -up chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc.missing-cstring chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc +--- chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc.missing-cstring 2021-11-12 05:28:09.000000000 -0500 ++++ chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc 2021-11-19 17:10:02.927438695 -0500 +@@ -8,6 +8,8 @@ + * be found in the AUTHORS file in the root of the source tree. + */ + ++#include ++ + #include "audio/utility/channel_mixer.h" + + #include "audio/utility/channel_mixing_matrix.h" +diff -up chromium-96.0.4664.45/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc.missing-cstring chromium-96.0.4664.45/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc +diff -up chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-cstring chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc +--- chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-cstring 2021-11-12 05:28:10.000000000 -0500 ++++ chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc 2021-11-19 17:10:02.928438701 -0500 +@@ -10,6 +10,7 @@ + + #include "modules/video_coding/utility/ivf_file_reader.h" + ++#include + #include + #include + diff --git a/chromium-96.0.4664.45-no-const-elements-in-std-vector.patch b/chromium-96.0.4664.45-no-const-elements-in-std-vector.patch new file mode 100644 index 00000000..e8667954 --- /dev/null +++ b/chromium-96.0.4664.45-no-const-elements-in-std-vector.patch @@ -0,0 +1,17 @@ +diff -up chromium-96.0.4664.45/net/test/embedded_test_server/http2_connection.cc.no-const chromium-96.0.4664.45/net/test/embedded_test_server/http2_connection.cc +--- chromium-96.0.4664.45/net/test/embedded_test_server/http2_connection.cc.no-const 2021-11-23 18:56:57.700174009 +0000 ++++ chromium-96.0.4664.45/net/test/embedded_test_server/http2_connection.cc 2021-11-23 18:57:39.405201162 +0000 +@@ -24,10 +24,9 @@ namespace net { + + namespace { + +-std::vector GenerateHeaders( +- HttpStatusCode status, +- base::StringPairs headers) { +- std::vector response_vector; ++std::vector GenerateHeaders(HttpStatusCode status, ++ base::StringPairs headers) { ++ std::vector response_vector; + response_vector.emplace_back( + http2::adapter::HeaderRep(std::string(":status")), + http2::adapter::HeaderRep(base::NumberToString(status))); diff --git a/chromium-98-MiraclePtr-gcc-ice.patch b/chromium-98-MiraclePtr-gcc-ice.patch new file mode 100644 index 00000000..c538befe --- /dev/null +++ b/chromium-98-MiraclePtr-gcc-ice.patch @@ -0,0 +1,91 @@ +Workaround GCC ICE with MiraclePtr, see https://gcc.gnu.org/PR103455 + +--- a/gpu/command_buffer/client/gl_helper.h ++++ b/gpu/command_buffer/client/gl_helper.h +@@ -34,7 +34,7 @@ class ScopedGLuint { + GenFunc gen_func, + DeleteFunc delete_func) + : gl_(gl), id_(0u), delete_func_(delete_func) { +- (gl_->*gen_func)(1, &id_); ++ (gl_.get()->*gen_func)(1, &id_); + } + + operator GLuint() const { return id_; } +@@ -46,7 +46,7 @@ class ScopedGLuint { + + ~ScopedGLuint() { + if (id_ != 0) { +- (gl_->*delete_func_)(1, &id_); ++ (gl_.get()->*delete_func_)(1, &id_); + } + } + +@@ -86,13 +86,13 @@ class ScopedBinder { + typedef void (gles2::GLES2Interface::*BindFunc)(GLenum target, GLuint id); + ScopedBinder(gles2::GLES2Interface* gl, GLuint id, BindFunc bind_func) + : gl_(gl), bind_func_(bind_func) { +- (gl_->*bind_func_)(Target, id); ++ (gl_.get()->*bind_func_)(Target, id); + } + + ScopedBinder(const ScopedBinder&) = delete; + ScopedBinder& operator=(const ScopedBinder&) = delete; + +- virtual ~ScopedBinder() { (gl_->*bind_func_)(Target, 0); } ++ virtual ~ScopedBinder() { (gl_.get()->*bind_func_)(Target, 0); } + + private: + raw_ptr gl_; +--- a/ui/accessibility/ax_node.h ++++ b/ui/accessibility/ax_node.h +@@ -822,10 +822,10 @@ AXNode::ChildIteratorBase*LastChild)()) ++ if (child_ == (parent_.get()->*LastChild)()) + child_ = nullptr; + else +- child_ = (child_->*NextSibling)(); ++ child_ = (child_.get()->*NextSibling)(); + } + + return *this; +@@ -850,12 +850,12 @@ AXNode::ChildIteratorBase*LastChild)(); ++ child_ = (parent_.get()->*LastChild)(); + // Decrement the iterator gives us the previous element, except when the + // iterator is at the beginning; in which case, decrementing the iterator + // remains at the beginning. +- else if (child_ != (parent_->*FirstChild)()) +- child_ = (child_->*PreviousSibling)(); ++ else if (child_ != (parent_.get()->*FirstChild)()) ++ child_ = (child_.get()->*PreviousSibling)(); + } + + return *this; +--- a/ui/views/layout/flex_layout_types.cc ++++ b/ui/views/layout/flex_layout_types.cc +@@ -59,7 +59,7 @@ class LazySize { + const gfx::Size& operator*() const { return *get(); } + const gfx::Size* get() const { + if (!size_) +- size_ = (view_->*size_func_)(); ++ size_ = (view_.get()->*size_func_)(); + return &size_.value(); + } + LazyDimension width() const { +--- a/chrome/browser/ui/views/passwords/auto_signin_first_run_dialog_view.cc ++++ b/chrome/browser/ui/views/passwords/auto_signin_first_run_dialog_view.cc +@@ -37,7 +37,7 @@ AutoSigninFirstRunDialogView::AutoSigninFirstRunDialogView( + auto call_controller = [](AutoSigninFirstRunDialogView* dialog, + ControllerCallbackFn func) { + if (dialog->controller_) { +- (dialog->controller_->*func)(); ++ (dialog->controller_.get()->*func)(); + } + }; + SetAcceptCallback( diff --git a/chromium-98-WaylandFrameManager-check.patch b/chromium-98-WaylandFrameManager-check.patch new file mode 100644 index 00000000..dc8b06b3 --- /dev/null +++ b/chromium-98-WaylandFrameManager-check.patch @@ -0,0 +1,27 @@ +From 8e2458ffc6727943518a622753b074b42e713403 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Sat, 18 Dec 2021 08:38:57 +0000 +Subject: [PATCH] libstdc++: fix DCHECK_NE in ui::WaylandFrameManager + +There is no CheckOpValueStr() for std::unique_ptr. Use get() to +compare pointer values. +--- + ui/ozone/platform/wayland/host/wayland_frame_manager.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ui/ozone/platform/wayland/host/wayland_frame_manager.cc b/ui/ozone/platform/wayland/host/wayland_frame_manager.cc +index 569526c..58fae14 100644 +--- a/ui/ozone/platform/wayland/host/wayland_frame_manager.cc ++++ b/ui/ozone/platform/wayland/host/wayland_frame_manager.cc +@@ -379,7 +379,7 @@ void WaylandFrameManager::OnPresentation( + // Investigate the issue with surface sync. + frame->feedback = gfx::PresentationFeedback::Failure(); + } +- CHECK_NE(frame, submitted_frames_.back()); ++ CHECK_NE(frame.get(), submitted_frames_.back().get()); + } + MaybeProcessSubmittedFrames(); + } +-- +2.32.0 + diff --git a/chromium-98.0.4758.80-EnumTable-crash.patch b/chromium-98.0.4758.80-EnumTable-crash.patch new file mode 100644 index 00000000..68459ba8 --- /dev/null +++ b/chromium-98.0.4758.80-EnumTable-crash.patch @@ -0,0 +1,75 @@ +diff -up chromium-98.0.4758.80/components/cast_channel/enum_table.h.EnumTable-crash chromium-98.0.4758.80/components/cast_channel/enum_table.h +--- chromium-98.0.4758.80/components/cast_channel/enum_table.h.EnumTable-crash 2022-02-01 00:41:47.000000000 +0000 ++++ chromium-98.0.4758.80/components/cast_channel/enum_table.h 2022-02-02 18:54:23.096214186 +0000 +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + #include "base/check_op.h" + #include "base/notreached.h" +@@ -187,7 +188,6 @@ class + inline constexpr GenericEnumTableEntry(int32_t value); + inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str); + +- GenericEnumTableEntry(const GenericEnumTableEntry&) = delete; + GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete; + + private: +@@ -253,7 +253,6 @@ class EnumTable { + constexpr Entry(E value, base::StringPiece str) + : GenericEnumTableEntry(static_cast(value), str) {} + +- Entry(const Entry&) = delete; + Entry& operator=(const Entry&) = delete; + }; + +@@ -312,15 +311,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 +@@ -348,8 +346,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(); + } + +@@ -364,7 +361,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) +@@ -376,8 +373,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/chromium-98.0.4758.80-el7-extra-operator==.patch b/chromium-98.0.4758.80-el7-extra-operator==.patch new file mode 100644 index 00000000..a6c37a82 --- /dev/null +++ b/chromium-98.0.4758.80-el7-extra-operator==.patch @@ -0,0 +1,15 @@ +diff -up chromium-98.0.4758.80/base/allocator/partition_allocator/starscan/metadata_allocator.h.wtf chromium-98.0.4758.80/base/allocator/partition_allocator/starscan/metadata_allocator.h +--- chromium-98.0.4758.80/base/allocator/partition_allocator/starscan/metadata_allocator.h.wtf 2022-02-05 16:05:15.125570250 +0000 ++++ chromium-98.0.4758.80/base/allocator/partition_allocator/starscan/metadata_allocator.h 2022-02-05 16:11:45.519670294 +0000 +@@ -39,6 +39,11 @@ class MetadataAllocator { + } + + template ++ bool operator==(const MetadataAllocator&) const { ++ return true; ++ } ++ ++ template + bool operator!=(const MetadataAllocator& o) { + return !operator==(o); + } diff --git a/chromium-98.0.4758.80-enable-hardware-accelerated-mjpeg.patch b/chromium-98.0.4758.80-enable-hardware-accelerated-mjpeg.patch new file mode 100644 index 00000000..71e28c19 --- /dev/null +++ b/chromium-98.0.4758.80-enable-hardware-accelerated-mjpeg.patch @@ -0,0 +1,62 @@ +diff -up chromium-98.0.4758.80/chrome/browser/about_flags.cc.accel-mjpeg chromium-98.0.4758.80/chrome/browser/about_flags.cc +--- chromium-98.0.4758.80/chrome/browser/about_flags.cc.accel-mjpeg 2022-02-01 00:41:40.000000000 +0000 ++++ chromium-98.0.4758.80/chrome/browser/about_flags.cc 2022-02-02 19:23:15.554137616 +0000 +@@ -3822,12 +3822,12 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kWebXrForceRuntimeDescription, kOsDesktop, + MULTI_VALUE_TYPE(kWebXrForceRuntimeChoices)}, + #endif // ENABLE_VR +-#if BUILDFLAG(IS_CHROMEOS_ASH) ++#if BUILDFLAG(IS_CHROMEOS_ASH) || defined(OS_LINUX) + {"disable-accelerated-mjpeg-decode", + flag_descriptions::kAcceleratedMjpegDecodeName, +- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS, ++ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux, + SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)}, +-#endif // BUILDFLAG(IS_CHROMEOS_ASH) ++#endif // BUILDFLAG(IS_CHROMEOS_ASH) || OS_LINUX + {"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName, + flag_descriptions::kSystemKeyboardLockDescription, kOsDesktop, + FEATURE_VALUE_TYPE(features::kSystemKeyboardLock)}, +diff -up chromium-98.0.4758.80/chrome/browser/flag_descriptions.cc.accel-mjpeg chromium-98.0.4758.80/chrome/browser/flag_descriptions.cc +--- chromium-98.0.4758.80/chrome/browser/flag_descriptions.cc.accel-mjpeg 2022-02-02 19:23:15.555137569 +0000 ++++ chromium-98.0.4758.80/chrome/browser/flag_descriptions.cc 2022-02-02 19:30:58.315465225 +0000 +@@ -3979,7 +3979,7 @@ const char kUseAngleGL[] = "OpenGL"; + + // Chrome OS ------------------------------------------------------------------- + +-#if BUILDFLAG(IS_CHROMEOS_ASH) ++#if BUILDFLAG(IS_CHROMEOS_ASH) || (defined(OS_LINUX) && !defined(OS_ANDROID)) + + const char kAcceleratedMjpegDecodeName[] = + "Hardware-accelerated mjpeg decode for captured frame"; +@@ -3987,6 +3987,10 @@ const char kAcceleratedMjpegDecodeDescri + "Enable hardware-accelerated mjpeg decode for captured frame where " + "available."; + ++#endif ++ ++#if BUILDFLAG(IS_CHROMEOS_ASH) ++ + const char kAllowDisableMouseAccelerationName[] = + "Allow disabling mouse acceleration"; + const char kAllowDisableMouseAccelerationDescription[] = +diff -up chromium-98.0.4758.80/chrome/browser/flag_descriptions.h.accel-mjpeg chromium-98.0.4758.80/chrome/browser/flag_descriptions.h +--- chromium-98.0.4758.80/chrome/browser/flag_descriptions.h.accel-mjpeg 2022-02-02 19:23:15.556137523 +0000 ++++ chromium-98.0.4758.80/chrome/browser/flag_descriptions.h 2022-02-02 19:31:59.585595773 +0000 +@@ -2297,11 +2297,15 @@ extern const char kUseAngleGL[]; + + // Chrome OS ------------------------------------------------------------------ + +-#if BUILDFLAG(IS_CHROMEOS_ASH) ++#if BUILDFLAG(IS_CHROMEOS_ASH) || (defined(OS_LINUX) && !defined(OS_ANDROID)) + + extern const char kAcceleratedMjpegDecodeName[]; + extern const char kAcceleratedMjpegDecodeDescription[]; + ++#endif ++ ++#if BUILDFLAG(IS_CHROMEOS_ASH) ++ + extern const char kAllowDisableMouseAccelerationName[]; + extern const char kAllowDisableMouseAccelerationDescription[]; + diff --git a/chromium-98.0.4758.80-epel7-erase-fix.patch b/chromium-98.0.4758.80-epel7-erase-fix.patch new file mode 100644 index 00000000..230e9d66 --- /dev/null +++ b/chromium-98.0.4758.80-epel7-erase-fix.patch @@ -0,0 +1,20 @@ +diff -up chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc.erase-fix chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc +--- chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc.erase-fix 2022-02-03 19:16:57.784979831 +0000 ++++ chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc 2022-02-03 19:17:12.983633352 +0000 +@@ -19,14 +19,14 @@ namespace { + // Remove any custom editor "prefixes" from the property name. The prefixes must + // not be valid identifier characters. + void StripPrefix(std::string& property_name) { +- auto cur = property_name.cbegin(); ++ auto cur = property_name.begin(); + for (; cur < property_name.cend(); ++cur) { + if ((*cur >= 'A' && *cur <= 'Z') || (*cur >= 'a' && *cur <= 'z') || + *cur == '_') { + break; + } + } +- property_name.erase(property_name.cbegin(), cur); ++ property_name.erase(property_name.begin(), cur); + } + + } // namespace diff --git a/chromium-98.0.4758.80-epel7-old-cups.patch b/chromium-98.0.4758.80-epel7-old-cups.patch new file mode 100644 index 00000000..8ed30b76 --- /dev/null +++ b/chromium-98.0.4758.80-epel7-old-cups.patch @@ -0,0 +1,167 @@ +diff -up chromium-98.0.4758.80/chrome/service/cloud_print/print_system_cups.cc.el7cups chromium-98.0.4758.80/chrome/service/cloud_print/print_system_cups.cc +--- chromium-98.0.4758.80/chrome/service/cloud_print/print_system_cups.cc.el7cups 2022-02-05 16:24:50.301779674 +0000 ++++ chromium-98.0.4758.80/chrome/service/cloud_print/print_system_cups.cc 2022-02-05 16:24:50.302779651 +0000 +@@ -729,8 +729,9 @@ int PrintSystemCUPS::PrintFile(const GUR + // Use default (local) print server. + if (url.is_empty()) + return cupsPrintFile(name, filename, title, num_options, options); +- +- printing::HttpConnectionCUPS http(url, encryption, /*blocking=*/false); ++ ++ printing::HttpConnectionCUPS http(url, encryption); ++ http.SetBlocking(false); + return cupsPrintFile2(http.http(), name, filename, title, num_options, + options); + } +@@ -746,7 +747,8 @@ int PrintSystemCUPS::GetJobs(cups_job_t* + if (url.is_empty()) + return cupsGetJobs(jobs, name, myjobs, whichjobs); + +- printing::HttpConnectionCUPS http(url, encryption, /*blocking=*/false); ++ printing::HttpConnectionCUPS http(url, encryption); ++ http.SetBlocking(false); + return cupsGetJobs2(http.http(), jobs, name, myjobs, whichjobs); + } + +diff -up chromium-98.0.4758.80/printing/backend/cups_helper.cc.el7cups chromium-98.0.4758.80/printing/backend/cups_helper.cc +--- chromium-98.0.4758.80/printing/backend/cups_helper.cc.el7cups 2022-02-05 16:25:16.885173676 +0000 ++++ chromium-98.0.4758.80/printing/backend/cups_helper.cc 2022-02-05 16:25:16.886173653 +0000 +@@ -34,18 +34,6 @@ namespace printing { + // This section contains helper code for PPD parsing for semantic capabilities. + namespace { + +-// Function availability can be tested by checking whether its address is not +-// nullptr. Weak symbols remove the need for platform specific build flags and +-// allow for appropriate CUPS usage on platforms with non-uniform version +-// support, namely Linux. +-#define WEAK_CUPS_FN(x) extern "C" __attribute__((weak)) decltype(x) x +- +-WEAK_CUPS_FN(httpConnect2); +- +-// Timeout for establishing a CUPS connection. It is expected that cupsd is +-// able to start and respond on all systems within this duration. +-constexpr base::TimeDelta kCupsTimeout = base::Seconds(5); +- + // CUPS default max copies value (parsed from kCupsMaxCopies PPD attribute). + constexpr int32_t kDefaultMaxCopies = 9999; + constexpr char kCupsMaxCopies[] = "cupsMaxCopies"; +@@ -527,8 +515,7 @@ const int kDefaultIPPServerPort = 631; + // Helper wrapper around http_t structure, with connection and cleanup + // functionality. + HttpConnectionCUPS::HttpConnectionCUPS(const GURL& print_server_url, +- http_encryption_t encryption, +- bool blocking) ++ http_encryption_t encryption) + : http_(nullptr) { + // If we have an empty url, use default print server. + if (print_server_url.is_empty()) +@@ -538,17 +525,10 @@ HttpConnectionCUPS::HttpConnectionCUPS(c + if (port == url::PORT_UNSPECIFIED) + port = kDefaultIPPServerPort; + +- if (httpConnect2) { +- http_ = httpConnect2(print_server_url.host().c_str(), port, +- /*addrlist=*/nullptr, AF_UNSPEC, encryption, +- blocking ? 1 : 0, kCupsTimeout.InMilliseconds(), +- /*cancel=*/nullptr); +- } else { +- // Continue to use deprecated CUPS calls because because older Linux +- // distribution such as RHEL/CentOS 7 are shipped with CUPS 1.6. +- http_ = +- httpConnectEncrypt(print_server_url.host().c_str(), port, encryption); +- } ++ // Continue to use deprecated CUPS calls because because older Linux ++ // distribution such as RHEL/CentOS 7 are shipped with CUPS 1.6. ++ http_ = ++ httpConnectEncrypt(print_server_url.host().c_str(), port, encryption); + + if (!http_) { + LOG(ERROR) << "CP_CUPS: Failed connecting to print server: " +@@ -556,8 +536,6 @@ HttpConnectionCUPS::HttpConnectionCUPS(c + return; + } + +- if (!httpConnect2) +- httpBlocking(http_, blocking ? 1 : 0); + } + + HttpConnectionCUPS::~HttpConnectionCUPS() { +@@ -565,6 +543,10 @@ HttpConnectionCUPS::~HttpConnectionCUPS( + httpClose(http_); + } + ++void HttpConnectionCUPS::SetBlocking(bool blocking) { ++ httpBlocking(http_, blocking ? 1 : 0); ++} ++ + http_t* HttpConnectionCUPS::http() { + return http_; + } +diff -up chromium-98.0.4758.80/printing/backend/cups_helper.h.el7cups chromium-98.0.4758.80/printing/backend/cups_helper.h +--- chromium-98.0.4758.80/printing/backend/cups_helper.h.el7cups 2022-02-05 16:25:16.886173653 +0000 ++++ chromium-98.0.4758.80/printing/backend/cups_helper.h 2022-02-05 16:25:16.886173653 +0000 +@@ -34,10 +34,11 @@ constexpr cups_ptype_t kDestinationsFilt + class COMPONENT_EXPORT(PRINT_BACKEND) HttpConnectionCUPS { + public: + HttpConnectionCUPS(const GURL& print_server_url, +- http_encryption_t encryption, +- bool blocking); ++ http_encryption_t encryption); + ~HttpConnectionCUPS(); + ++ void SetBlocking(bool blocking); ++ + http_t* http(); + + private: +diff -up chromium-98.0.4758.80/printing/backend/print_backend_cups.cc.el7cups chromium-98.0.4758.80/printing/backend/print_backend_cups.cc +--- chromium-98.0.4758.80/printing/backend/print_backend_cups.cc.el7cups 2022-02-05 16:25:16.887173630 +0000 ++++ chromium-98.0.4758.80/printing/backend/print_backend_cups.cc 2022-02-07 00:23:16.315248327 +0000 +@@ -146,7 +146,7 @@ mojom::ResultCode PrintBackendCUPS::Enum + // not showing as available. Using cupsEnumDests() allows us to do our own + // filtering should any duplicates occur. + CupsDestsData dests_data = {0, nullptr}; +- ipp_status_t last_error = IPP_STATUS_OK; ++ ipp_status_t last_error = IPP_OK; + if (print_server_url_.is_empty()) { + VLOG(1) << "CUPS: using cupsEnumDests to enumerate printers"; + if (!cupsEnumDests(CUPS_DEST_FLAGS_NONE, kCupsTimeoutMs, +@@ -173,7 +173,7 @@ mojom::ResultCode PrintBackendCUPS::Enum + // no printer drivers installed. Rely upon CUPS error code to distinguish + // between these. + DCHECK(!dests_data.dests); +- if (last_error != IPP_STATUS_ERROR_NOT_FOUND) { ++ if (last_error != IPP_NOT_FOUND) { + VLOG(1) << "CUPS: Error getting printers from CUPS server" + << ", server: " << print_server_url_ + << ", error: " << static_cast(last_error) << " - " +@@ -336,7 +336,8 @@ int PrintBackendCUPS::GetDests(cups_dest + if (print_server_url_.is_empty()) + return cupsGetDests2(CUPS_HTTP_DEFAULT, dests); + +- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_); ++ HttpConnectionCUPS http(print_server_url_, cups_encryption_); ++ http.SetBlocking(blocking_); + + // This call must be made in the same scope as `http` because its destructor + // closes the connection. +@@ -362,7 +363,8 @@ base::FilePath PrintBackendCUPS::GetPPD( + // connection will timeout after 10 seconds of no data period. And it will + // return the same way as if data was completely and successfully + // downloaded. +- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_); ++ HttpConnectionCUPS http(print_server_url_, cups_encryption_); ++ http.SetBlocking(blocking_); + ppd_file_path = cupsGetPPD2(http.http(), name); + // Check if the get full PPD, since non-blocking call may simply return + // normally after timeout expired. +@@ -398,7 +400,8 @@ PrintBackendCUPS::ScopedDestination Prin + // Use default (local) print server. + dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, printer_name.c_str(), nullptr); + } else { +- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_); ++ HttpConnectionCUPS http(print_server_url_, cups_encryption_); ++ http.SetBlocking(blocking_); + dest = cupsGetNamedDest(http.http(), printer_name.c_str(), nullptr); + } + return ScopedDestination(dest); diff --git a/chromium-98.0.4758.80-epel7-old-headers-workarounds.patch b/chromium-98.0.4758.80-epel7-old-headers-workarounds.patch new file mode 100644 index 00000000..325ba15e --- /dev/null +++ b/chromium-98.0.4758.80-epel7-old-headers-workarounds.patch @@ -0,0 +1,127 @@ +diff -up chromium-98.0.4758.80/mojo/core/channel_linux.cc.epel7-header-workarounds chromium-98.0.4758.80/mojo/core/channel_linux.cc +--- chromium-98.0.4758.80/mojo/core/channel_linux.cc.epel7-header-workarounds 2022-02-03 18:37:49.535504412 +0000 ++++ chromium-98.0.4758.80/mojo/core/channel_linux.cc 2022-02-03 18:55:08.833815527 +0000 +@@ -44,6 +44,25 @@ + #include "base/android/build_info.h" + #endif + ++#ifndef F_LINUX_SPECIFIC_BASE ++#define F_LINUX_SPECIFIC_BASE 1024 ++#endif ++#ifndef F_SEAL_SEAL ++#define F_SEAL_SEAL 0x0001 ++#endif ++#ifndef F_SEAL_SHRINK ++#define F_SEAL_SHRINK 0x0002 ++#endif ++#ifndef F_SEAL_GROW ++#define F_SEAL_GROW 0x0004 ++#endif ++#ifndef F_ADD_SEALS ++#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) ++#endif ++#ifndef F_GET_SEALS ++#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10) ++#endif ++ + #ifndef EFD_ZERO_ON_WAKE + #define EFD_ZERO_ON_WAKE O_NOFOLLOW + #endif +diff -up chromium-98.0.4758.80/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc.epel7-header-workarounds chromium-98.0.4758.80/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +--- chromium-98.0.4758.80/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc.epel7-header-workarounds 2022-02-01 00:41:54.000000000 +0000 ++++ chromium-98.0.4758.80/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 2022-02-03 18:37:49.536504389 +0000 +@@ -53,6 +53,25 @@ + + #endif // defined(OS_ANDROID) + ++#ifndef F_LINUX_SPECIFIC_BASE ++#define F_LINUX_SPECIFIC_BASE 1024 ++#endif ++#ifndef F_SEAL_SEAL ++#define F_SEAL_SEAL 0x0001 ++#endif ++#ifndef F_SEAL_SHRINK ++#define F_SEAL_SHRINK 0x0002 ++#endif ++#ifndef F_SEAL_GROW ++#define F_SEAL_GROW 0x0004 ++#endif ++#ifndef F_ADD_SEALS ++#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) ++#endif ++#ifndef F_GET_SEALS ++#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10) ++#endif ++ + #if defined(__arm__) && !defined(MAP_STACK) + #define MAP_STACK 0x20000 // Daisy build environment has old headers. + #endif +diff -up chromium-98.0.4758.80/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc.epel7-header-workarounds chromium-98.0.4758.80/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc +--- chromium-98.0.4758.80/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc.epel7-header-workarounds 2022-02-01 00:41:54.000000000 +0000 ++++ chromium-98.0.4758.80/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc 2022-02-03 18:37:49.535504412 +0000 +@@ -6,7 +6,24 @@ + + #include + #include +-#include ++#ifndef KCMP_FILE ++#define KCMP_FILE 0 ++#endif ++#ifndef F_LINUX_SPECIFIC_BASE ++#define F_LINUX_SPECIFIC_BASE 1024 ++#endif ++#ifndef F_SEAL_SEAL ++#define F_SEAL_SEAL 0x0001 ++#endif ++#ifndef F_SEAL_SHRINK ++#define F_SEAL_SHRINK 0x0002 ++#endif ++#ifndef F_SEAL_GROW ++#define F_SEAL_GROW 0x0004 ++#endif ++#ifndef F_ADD_SEALS ++#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) ++#endif + #include + + // Some arch's (arm64 for instance) unistd.h don't pull in symbols used here +diff -up chromium-98.0.4758.80/sandbox/policy/linux/bpf_gpu_policy_linux.cc.epel7-header-workarounds chromium-98.0.4758.80/sandbox/policy/linux/bpf_gpu_policy_linux.cc +--- chromium-98.0.4758.80/sandbox/policy/linux/bpf_gpu_policy_linux.cc.epel7-header-workarounds 2022-02-03 18:37:49.535504412 +0000 ++++ chromium-98.0.4758.80/sandbox/policy/linux/bpf_gpu_policy_linux.cc 2022-02-03 18:56:24.382093563 +0000 +@@ -22,6 +22,22 @@ + #include "sandbox/policy/linux/sandbox_linux.h" + #include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h" + ++#ifndef F_LINUX_SPECIFIC_BASE ++#define F_LINUX_SPECIFIC_BASE 1024 ++#endif ++#ifndef F_SEAL_SEAL ++#define F_SEAL_SEAL 0x0001 ++#endif ++#ifndef F_SEAL_SHRINK ++#define F_SEAL_SHRINK 0x0002 ++#endif ++#ifndef F_SEAL_GROW ++#define F_SEAL_GROW 0x0004 ++#endif ++#ifndef F_ADD_SEALS ++#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) ++#endif ++ + using sandbox::bpf_dsl::AllOf; + using sandbox::bpf_dsl::Allow; + using sandbox::bpf_dsl::Arg; +diff -up chromium-98.0.4758.80/ui/events/ozone/evdev/event_converter_evdev_impl.cc.epel7-header-workarounds chromium-98.0.4758.80/ui/events/ozone/evdev/event_converter_evdev_impl.cc +--- chromium-98.0.4758.80/ui/events/ozone/evdev/event_converter_evdev_impl.cc.epel7-header-workarounds 2022-02-03 18:37:49.536504389 +0000 ++++ chromium-98.0.4758.80/ui/events/ozone/evdev/event_converter_evdev_impl.cc 2022-02-03 18:57:16.842897816 +0000 +@@ -23,6 +23,10 @@ + #include "ui/events/ozone/evdev/numberpad_metrics.h" + #endif + ++#ifndef SW_PEN_INSERTED ++#define SW_PEN_INSERTED 0x0f /* set = pen inserted */ ++#endif ++ + namespace ui { + + namespace { diff --git a/chromium-98.0.4758.80-fedora-user-agent.patch b/chromium-98.0.4758.80-fedora-user-agent.patch new file mode 100644 index 00000000..84dddf2c --- /dev/null +++ b/chromium-98.0.4758.80-fedora-user-agent.patch @@ -0,0 +1,12 @@ +diff -up chromium-98.0.4758.80/content/common/user_agent.cc.fedora-user-agent chromium-98.0.4758.80/content/common/user_agent.cc +--- chromium-98.0.4758.80/content/common/user_agent.cc.fedora-user-agent 2022-02-02 19:16:37.841755606 +0000 ++++ chromium-98.0.4758.80/content/common/user_agent.cc 2022-02-02 19:19:52.395650550 +0000 +@@ -34,7 +34,7 @@ std::string GetUserAgentPlatform() { + #elif defined(OS_MAC) + return "Macintosh; "; + #elif defined(USE_OZONE) +- return "X11; "; // strange, but that's what Firefox uses ++ return "X11; Fedora; "; // strange, but that's what Firefox uses + #elif defined(OS_ANDROID) + return "Linux; "; + #elif defined(OS_FUCHSIA) diff --git a/chromium-98.0.4758.80-remoting-cstring.patch b/chromium-98.0.4758.80-remoting-cstring.patch new file mode 100644 index 00000000..5c969211 --- /dev/null +++ b/chromium-98.0.4758.80-remoting-cstring.patch @@ -0,0 +1,56 @@ +diff -up chromium-98.0.4758.80/remoting/base/util.cc.remoting-cstring chromium-98.0.4758.80/remoting/base/util.cc +--- chromium-98.0.4758.80/remoting/base/util.cc.remoting-cstring 2022-02-01 00:41:54.000000000 +0000 ++++ chromium-98.0.4758.80/remoting/base/util.cc 2022-02-02 15:55:01.352340901 +0000 +@@ -4,6 +4,7 @@ + + #include "remoting/base/util.h" + ++#include + #include + + #include "base/logging.h" +diff -up chromium-98.0.4758.80/remoting/client/display/gl_helpers.cc.remoting-cstring chromium-98.0.4758.80/remoting/client/display/gl_helpers.cc +--- chromium-98.0.4758.80/remoting/client/display/gl_helpers.cc.remoting-cstring 2022-02-01 00:41:54.000000000 +0000 ++++ chromium-98.0.4758.80/remoting/client/display/gl_helpers.cc 2022-02-02 15:55:01.353340854 +0000 +@@ -5,6 +5,7 @@ + #include "remoting/client/display/gl_helpers.h" + + #include "base/logging.h" ++#include + + namespace remoting { + +diff -up chromium-98.0.4758.80/remoting/host/fake_mouse_cursor_monitor.cc.remoting-cstring chromium-98.0.4758.80/remoting/host/fake_mouse_cursor_monitor.cc +--- chromium-98.0.4758.80/remoting/host/fake_mouse_cursor_monitor.cc.remoting-cstring 2022-02-01 00:41:54.000000000 +0000 ++++ chromium-98.0.4758.80/remoting/host/fake_mouse_cursor_monitor.cc 2022-02-02 15:55:01.353340854 +0000 +@@ -4,6 +4,7 @@ + + #include "remoting/host/fake_mouse_cursor_monitor.h" + ++#include + #include + + #include "base/check.h" +diff -up chromium-98.0.4758.80/remoting/host/host_config_unittest.cc.remoting-cstring chromium-98.0.4758.80/remoting/host/host_config_unittest.cc +--- chromium-98.0.4758.80/remoting/host/host_config_unittest.cc.remoting-cstring 2022-02-02 15:55:01.353340854 +0000 ++++ chromium-98.0.4758.80/remoting/host/host_config_unittest.cc 2022-02-02 15:57:20.295794172 +0000 +@@ -10,6 +10,7 @@ + #include "base/values.h" + #include "testing/gtest/include/gtest/gtest.h" + #include "third_party/abseil-cpp/absl/types/optional.h" ++#include + + namespace remoting { + +diff -up chromium-98.0.4758.80/remoting/host/host_secret.cc.remoting-cstring chromium-98.0.4758.80/remoting/host/host_secret.cc +--- chromium-98.0.4758.80/remoting/host/host_secret.cc.remoting-cstring 2022-02-01 00:41:54.000000000 +0000 ++++ chromium-98.0.4758.80/remoting/host/host_secret.cc 2022-02-02 15:55:01.353340854 +0000 +@@ -6,7 +6,7 @@ + + #include + +-#include ++#include + + #include "base/rand_util.h" + #include "base/strings/string_number_conversions.h" diff --git a/chromium-98.0.4758.80-remoting-extra-qualification.patch b/chromium-98.0.4758.80-remoting-extra-qualification.patch new file mode 100644 index 00000000..013fdc9d --- /dev/null +++ b/chromium-98.0.4758.80-remoting-extra-qualification.patch @@ -0,0 +1,84 @@ +diff -up chromium-98.0.4758.80/remoting/host/mojom/remoting_mojom_traits.h.extra-qualification chromium-98.0.4758.80/remoting/host/mojom/remoting_mojom_traits.h +--- chromium-98.0.4758.80/remoting/host/mojom/remoting_mojom_traits.h.extra-qualification 2022-02-04 00:55:00.643766557 +0000 ++++ chromium-98.0.4758.80/remoting/host/mojom/remoting_mojom_traits.h 2022-02-04 00:56:18.272148934 +0000 +@@ -21,7 +21,7 @@ + namespace mojo { + + template <> +-class mojo::StructTraits { ++class StructTraits { + public: + static bool value(bool value) { return value; } + +@@ -32,7 +32,7 @@ class mojo::StructTraits +-class mojo::StructTraits { ++class StructTraits { + public: + static float value(float value) { return value; } + +@@ -43,7 +43,7 @@ class mojo::StructTraits +-class mojo::StructTraits { ++class StructTraits { + public: + static int32_t value(int32_t value) { return value; } + +@@ -109,7 +109,7 @@ struct EnumTraits +-class mojo::StructTraits { + public: + static const std::string& mime_type( +@@ -127,7 +127,7 @@ class mojo::StructTraits +-class mojo::StructTraits { + public: + static bool pressed(const ::remoting::protocol::KeyEvent& event) { +@@ -163,7 +163,7 @@ class mojo::StructTraits +-class mojo::StructTraits { + public: + static absl::optional x( +@@ -252,7 +252,7 @@ class mojo::StructTraits +-class mojo::StructTraits { + public: + static const std::string& text(const ::remoting::protocol::TextEvent& event) { +@@ -264,7 +264,7 @@ class mojo::StructTraits +-class mojo::StructTraits { + public: + static uint32_t id(const ::remoting::protocol::TouchEventPoint& event) { +@@ -341,7 +341,7 @@ struct EnumTraits +-class mojo::StructTraits { + public: + static ::remoting::protocol::TouchEvent::TouchEventType event_type( diff --git a/chromium-browser.desktop b/chromium-browser.desktop index 962decbd..23d3257b 100644 --- a/chromium-browser.desktop +++ b/chromium-browser.desktop @@ -134,7 +134,7 @@ X-MultipleArgs=false Type=Application Icon=chromium-browser Categories=Network;WebBrowser; -MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp; +MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https; StartupWMClass=Chromium-browser Keywords=web;browser;internet; Actions=new-window;new-private-window; diff --git a/chromium-browser.sh b/chromium-browser.sh index d76aabe4..b0ace534 100755 --- a/chromium-browser.sh +++ b/chromium-browser.sh @@ -50,6 +50,11 @@ CHROMIUM_DISTRO_FLAGS=" --enable-plugins \ --enable-sync \ --auto-ssl-client-auth @@EXTRA_FLAGS@@" +# This provides a much better experience on Wayland. +if [ "$XDG_SESSION_TYPE" == "wayland" ] || [[ $WAYLAND_DISPLAY ]] ; then + CHROMIUM_DISTRO_FLAGS="--ozone-platform=wayland $CHROMIUM_DISTRO_FLAGS" +fi + if [ -f "$HERE/PepperFlash/libpepflashplayer.so" ] && [ -f "$HERE/PepperFlash/manifest.json" ] ; then CHROMIUM_FLASH_VERSION=$(grep '"version":' "$HERE/PepperFlash/manifest.json" | awk -F\" '{ print $4 }') CHROMIUM_FLASH_FLAGS=" --ppapi-flash-path=$HERE/PepperFlash/libpepflashplayer.so \ diff --git a/chromium-freetype-2.11.patch b/chromium-freetype-2.11.patch new file mode 100644 index 00000000..aee6dc82 --- /dev/null +++ b/chromium-freetype-2.11.patch @@ -0,0 +1,50 @@ +--- a/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp ++++ b/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp +@@ -712,7 +712,11 @@ void colrv1_draw_paint(SkCanvas* canvas, + canvas->drawPaint(colrPaint); + break; + } ++#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11 ++ case FT_COLR_PAINTFORMAT_TRANSFORM: ++#else + case FT_COLR_PAINTFORMAT_TRANSFORMED: ++#endif + case FT_COLR_PAINTFORMAT_TRANSLATE: + case FT_COLR_PAINTFORMAT_ROTATE: + case FT_COLR_PAINTFORMAT_SKEW: +@@ -759,10 +763,17 @@ void colrv1_transform(SkCanvas* canvas, FT_Face face, FT_COLR_Paint colrv1_paint + SkMatrix transform; + + switch (colrv1_paint.format) { ++#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11 ++ case FT_COLR_PAINTFORMAT_TRANSFORM: { ++ transform = ToSkMatrix(colrv1_paint.u.transform.affine); ++ break; ++ } ++#else + case FT_COLR_PAINTFORMAT_TRANSFORMED: { + transform = ToSkMatrix(colrv1_paint.u.transformed.affine); + break; + } ++#endif + case FT_COLR_PAINTFORMAT_TRANSLATE: { + transform = SkMatrix::Translate( + SkFixedToScalar(colrv1_paint.u.translate.dx), +@@ -880,10 +891,17 @@ bool colrv1_traverse_paint(SkCanvas* canvas, + traverse_result = colrv1_start_glyph(canvas, palette, face, paint.u.colr_glyph.glyphID, + FT_COLOR_NO_ROOT_TRANSFORM); + break; ++#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11 ++ case FT_COLR_PAINTFORMAT_TRANSFORM: ++ colrv1_transform(canvas, face, paint); ++ traverse_result = colrv1_traverse_paint(canvas, palette, face, ++ paint.u.transform.paint, visited_set); ++#else + case FT_COLR_PAINTFORMAT_TRANSFORMED: + colrv1_transform(canvas, face, paint); + traverse_result = colrv1_traverse_paint(canvas, palette, face, + paint.u.transformed.paint, visited_set); ++#endif + break; + case FT_COLR_PAINTFORMAT_TRANSLATE: + colrv1_transform(canvas, face, paint); diff --git a/chromium.spec b/chromium.spec index 5a8ca41a..be223d86 100644 --- a/chromium.spec +++ b/chromium.spec @@ -1,18 +1,21 @@ %define _lto_cflags %{nil} %global numjobs 10 -%ifarch aarch64 +%ifarch aarch64 i686 %global numjobs 8 %endif # This flag is so I can build things very fast on a giant system. -# Do not enable in Koji builds. +# Enabling this in koji causes aarch64 builds to timeout indefinitely. %global use_all_cpus 0 %if %{use_all_cpus} %global numjobs %{_smp_build_ncpus} %endif +# official builds have less debugging and go faster... but we have to shut some things off. +%global official_build 1 + # Fancy build status, so we at least know, where we are.. # %1 where # %2 what @@ -20,7 +23,6 @@ export NINJA_STATUS="[%2:%f/%t] " ; \ ../depot_tools/ninja -j %{numjobs} -C '%1' -vvv '%2' - # This was faster when it worked, but it didn't always. # As of chromium 80, it is no longer supported. RIP. %global use_jumbo 0 @@ -31,6 +33,15 @@ # This doesn't work and it doesn't even build as of Chromium 83 %global build_remoting 1 +# This is finally possible with Chromium 93 +%global build_with_python3 1 + +%if 0%{?build_with_python3} +%global chromium_pybin %{__python3} +%else +%global chromium_pybin %{__python2} +%endif + # We'd like to always have this on... # ... but the libva in EL7 (and EL8) is too old. %if 0%{?rhel} == 7 || 0%{?rhel} == 8 @@ -94,11 +105,11 @@ # for RHEL7, append libfontconfig to the end # make sure there is not a trailing | at the end of the list -# We don't really need to do this unless we're building shared. +# We always filter provides. We only filter Requires when building shared. +%global __provides_exclude_from ^(%{chromium_path}/.*\\.so|%{chromium_path}/.*\\.so.*|%{chromium_path}/lib/.*\\.so|%{chromium_path}/lib/.*\\.so.*)$ %if 0%{?shared} -%global __provides_exclude_from %{chromium_path}/.*\\.so|%{chromium_path}/lib/.*\\.so|%{chromium_path}/lib/.*\\.so.* %if 0%{?rhel} == 7 %global privlibs libaccessibility|libandroid_mojo_bindings_shared|libanimation|libapdu|libaura|libaura_extra|libauthenticator_test_mojo_bindings_shared|libbase|libbase_i18n|libbindings|libbindings_base|libblink_common|libblink_controller|libblink_core|libblink_embedded_frame_sink_mojo_bindings_shared|libblink_features|libblink_modules|libblink_mojom_broadcastchannel_bindings_shared|libblink_platform|libbluetooth|libboringssl|libbrowser_ui_views|libcaptive_portal|libcapture_base|libcapture_lib|libcbor|libcc|libcc_animation|libcc_base|libcc_debug|libcc_ipc|libcc_mojo_embedder|libcc_paint|libcertificate_matching|libcert_verifier|libchrome_features|libchromium_sqlite3|libclearkeycdm|libclient|libcloud_policy_proto_generated_compile|libcodec|libcolor_space|libcolor_utils|libcommon|libcompositor|libcontent|libcontent_common_mojo_bindings_shared|libcontent_public_common_mojo_bindings_shared|libcontent_service_cpp|libcontent_service_mojom|libcontent_service_mojom_shared|libcontent_settings_features|libcrash_key_lib|libcrcrypto|libcrdtp|libdbus|libdevice_base|libdevice_event_log|libdevice_features|libdevice_gamepad|libdevices|libdevice_vr|libdevice_vr_mojo_bindings|libdevice_vr_mojo_bindings_blink|libdevice_vr_mojo_bindings_shared|libdevice_vr_test_mojo_bindings|libdevice_vr_test_mojo_bindings_blink|libdevice_vr_test_mojo_bindings_shared|libdiscardable_memory_client|libdiscardable_memory_common|libdiscardable_memory_service|libdisplay|libdisplay_types|libdisplay_util|libdomain_reliability|libdom_storage_mojom|libdom_storage_mojom_shared|libEGL|libEGL|libembedder|libembedder_switches|libevents|libevents_base|libevents_devices_x11|libevents_ozone_layout|libevents_x|libextras|libffmpeg|libfido|libfingerprint|libfreetype_harfbuzz|libgamepad_mojom|libgamepad_mojom_blink|libgamepad_mojom_shared|libgamepad_shared_typemap_traits|libgcm|libgeometry|libgeometry_skia|libgesture_detection|libgfx|libgfx_ipc|libgfx_ipc_buffer_types|libgfx_ipc_color|libgfx_ipc_geometry|libgfx_ipc_skia|libgfx_switches|libgfx_x11|libgin|libgles2|libgles2_implementation|libgles2_utils|libGLESv2|libGLESv2|libgl_init|libgl_in_process_context|libgl_wrapper|libgpu|libgpu_ipc_service|libgtkui|libheadless_non_renderer|libhost|libicui18n|libicuuc|libinterfaces_shared|libipc|libipc_mojom|libipc_mojom_shared|libkeycodes_x11|libkeyed_service_content|libkeyed_service_core|liblearning_common|liblearning_impl|libleveldatabase|libleveldb_proto|libmanager|libmedia|libmedia_blink|libmedia_gpu|libmedia_learning_mojo_impl|libmedia_message_center|libmedia_mojo_services|libmedia_session_base_cpp|libmedia_session_cpp|libmedia_webrtc|libmemory_instrumentation|libmenu|libmessage_center|libmessage_support|libmetrics_cpp|libmidi|libmirroring_service|libmojo_base_lib|libmojo_base_mojom|libmojo_base_mojom_blink|libmojo_base_mojom_shared|libmojo_base_shared_typemap_traits|libmojo_core_embedder|libmojo_core_embedder_internal|libmojo_core_ports|libmojo_cpp_platform|libmojom_core_shared|libmojom_mhtml_load_result_shared|libmojom_modules_shared|libmojo_mojom_bindings|libmojo_mojom_bindings_shared|libmojom_platform_shared|libmojo_public_system|libmojo_public_system_cpp|libnative_theme|libnet|libnetwork_cpp|libnetwork_cpp_base|libnetwork_service|libnetwork_session_configurator|libonc|libos_crypt|libparsers|libpdfium|libperfetto|libperformace_manager_public_mojom|libperformace_manager_public_mojom_blink|libperformace_manager_public_mojom_shared|libplatform|libplatform_window|libplatform_window_common|libplatform_window_handler_libs|libpolicy_component|libpolicy_proto|libppapi_host|libppapi_proxy|libppapi_shared|libprefs|libprinting|libproperties|libprotobuf_lite|libproxy_config|libpublic|librange|libraster|libresource_coordinator_public_mojom|libresource_coordinator_public_mojom_blink|libresource_coordinator_public_mojom_shared|libsandbox|libsandbox_services|libscheduling_metrics|libseccomp_bpf|libsecurity_state_features|libservice|libservice_manager_cpp|libservice_manager_cpp_types|libservice_manager_mojom|libservice_manager_mojom_blink|libservice_manager_mojom_constants|libservice_manager_mojom_constants_blink|libservice_manager_mojom_constants_shared|libservice_manager_mojom_shared|libservice_manager_mojom_traits|libservice_provider|libsessions|libshared_memory_support|libshared_with_blink|libshell_dialogs|libskia|libskia_shared_typemap_traits|libsnapshot|libsql|libstartup_tracing|libstorage_browser|libstorage_common|libstorage_service_public|libstub_window|libsuid_sandbox_client|libsurface|libsystem_media_controls|libtab_count_metrics|libthread_linux|libtracing|libtracing_cpp|libtracing_mojom|libtracing_mojom_shared|libui_accessibility_ax_mojom|libui_accessibility_ax_mojom_blink|libui_accessibility_ax_mojom_shared|libui_base|libui_base_clipboard|libui_base_clipboard_types|libui_base_features|libui_base_idle|libui_base_ime|libui_base_ime_init|libui_base_ime_linux|libui_base_ime_types|libui_base_x|libui_data_pack|libui_devtools|libui_message_center_cpp|libui_touch_selection|liburl|liburl_ipc|liburl_matcher|libusb_shared|libuser_manager|libuser_prefs|libv8|libv8_libbase|libv8_libplatform|libviews|libviz_common|libviz_resource_format_utils|libviz_vulkan_context_provider|libVkICD_mock_icd|libvk_swiftshader|libvr_base|libvr_common|libvulkan_info|libvulkan_init|libvulkan_wrapper|libvulkan_x11|libvulkan_ycbcr_info|libweb_bluetooth_mojo_bindings_shared|libwebdata_common|libweb_dialogs|libweb_feature_mojo_bindings_mojom|libweb_feature_mojo_bindings_mojom_blink|libweb_feature_mojo_bindings_mojom_shared|libwebgpu|libweb_modal|libwebrtc_component|libwebview|libwm|libwm_public|libwtf|libwtf_support|libx11_events_platform|libx11_window|libzygote|libfontconfig %else @@ -130,7 +141,7 @@ BuildRequires: libicu-devel >= 5.4 # Fedora's Python 2 stack is being removed, we use the bundled Python libraries # This can be revisited once we upgrade to Python 3 -%global bundlepylibs 1 +%global bundlepylibs 0 # RHEL 7.9 dropped minizip. # It exists everywhere else though. @@ -144,7 +155,7 @@ BuildRequires: libicu-devel >= 5.4 %global gtk3 1 %if 0%{?rhel} == 7 || 0%{?rhel} == 8 -%global dts_version 10 +%global dts_version 11 %global bundleopus 1 %global bundlelibusbx 1 @@ -156,25 +167,19 @@ BuildRequires: libicu-devel >= 5.4 %global bundlelibdrm 1 %global bundlefontconfig 1 %else -%global bundleharfbuzz 0 +# Chromium really wants to use its bundled harfbuzz. Sigh. +%global bundleharfbuzz 1 %global bundleopus 1 %global bundlelibusbx 0 %global bundlelibwebp 0 %global bundlelibpng 0 %global bundlelibjpeg 0 -%global bundlefreetype 0 +# Needs FT_ClipBox which was implemented after 2.11.0. Should be able to set this back to 0 later. +%global bundlefreetype 1 %global bundlelibdrm 0 %global bundlefontconfig 0 %endif -# Needs at least harfbuzz 2.4.0 now. -# 2019-09-13 -%if 0%{?fedora} < 31 -%global bundleharfbuzz 1 -%else -%global bundleharfbuzz 0 -%endif - ### From 2013 until early 2021, Google permitted distribution builds of ### Chromium to access Google APIs that added significant features to ### Chromium including, but not limited to, Sync and geolocation. @@ -208,14 +213,14 @@ BuildRequires: libicu-devel >= 5.4 %global chromoting_client_id %nil %endif -%global majorversion 91 +%global majorversion 98 %if %{freeworld} Name: chromium%{chromium_channel}%{nsuffix} %else Name: chromium%{chromium_channel} %endif -Version: %{majorversion}.0.4472.114 +Version: %{majorversion}.0.4758.80 Release: 1%{?dist} %if %{?freeworld} %if %{?shared} @@ -244,71 +249,76 @@ Patch4: chromium-60.0.3112.78-jpeg-nomangle.patch # Do not mangle zlib Patch5: chromium-77.0.3865.75-no-zlib-mangle.patch # Do not use unrar code, it is non-free -Patch6: chromium-89.0.4389.72-norar.patch +Patch6: chromium-95.0.4638.69-norar.patch # Use Gentoo's Widevine hack # https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-widevine-r3.patch Patch7: chromium-71.0.3578.98-widevine-r3.patch -# Disable fontconfig cache magic that breaks remoting -Patch8: chromium-91.0.4472.77-disable-fontconfig-cache-magic.patch # drop rsp clobber, which breaks gcc9 (thanks to Jeff Law) -Patch9: chromium-78.0.3904.70-gcc9-drop-rsp-clobber.patch +Patch9: chromium-94.0.4606.54-gcc9-drop-rsp-clobber.patch # Try to load widevine from other places -Patch10: chromium-89.0.4389.72-widevine-other-locations.patch -# Try to fix version.py for Rawhide -Patch11: chromium-71.0.3578.98-py2-bootstrap.patch +Patch10: chromium-92.0.4515.107-widevine-other-locations.patch +# Tell bootstrap.py to always use the version of Python we specify +%if 0%{?build_with_python3} +Patch11: chromium-93.0.4577.63-py3-bootstrap.patch +%else +Patch11: chromium-92.0.4515.107-py2-bootstrap.patch +%endif # Add "Fedora" to the user agent string -Patch12: chromium-86.0.4240.75-fedora-user-agent.patch +Patch12: chromium-98.0.4758.80-fedora-user-agent.patch # Needs to be submitted.. -Patch51: chromium-76.0.3809.100-gcc-remoting-constexpr.patch +Patch51: chromium-96.0.4664.45-gcc-remoting-constexpr.patch # https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-unbundle-zlib.patch Patch52: chromium-81.0.4044.92-unbundle-zlib.patch -# Needs to be submitted.. -Patch53: chromium-77.0.3865.75-gcc-include-memory.patch # https://github.com/stha09/chromium-patches/blob/master/chromium-78-protobuf-RepeatedPtrField-export.patch Patch55: chromium-78-protobuf-RepeatedPtrField-export.patch # ../../third_party/perfetto/include/perfetto/base/task_runner.h:48:55: error: 'uint32_t' has not been declared -Patch56: chromium-80.0.3987.87-missing-cstdint-header.patch +Patch56: chromium-96.0.4664.45-missing-cstdint-header.patch # Missing (thanks c++17) -Patch57: chromium-89.0.4389.72-missing-cstring-header.patch +Patch57: chromium-96.0.4664.45-missing-cstring.patch # prepare for using system ffmpeg (clean) # http://svnweb.mageia.org/packages/cauldron/chromium-browser-stable/current/SOURCES/chromium-53-ffmpeg-no-deprecation-errors.patch?view=markup Patch58: chromium-53-ffmpeg-no-deprecation-errors.patch -# https://github.com/stha09/chromium-patches/blob/master/chromium-91-pcscan-vector-types.patch -Patch59: chromium-91-pcscan-vector-types.patch -# https://github.com/stha09/chromium-patches/blob/master/chromium-91-libyuv-aarch64.patch -Patch60: chromium-91-libyuv-aarch64.patch -# Update third_party/highway to 0.12.2 -# this is needed for sane arm/aarch64 -Patch61: chromium-91.0.4472.77-update-highway-0.12.2.patch -# https://github.com/stha09/chromium-patches/blob/master/chromium-90-ruy-include.patch -Patch62: chromium-90-ruy-include.patch +# https://github.com/stha09/chromium-patches/blob/master/chromium-95-libyuv-arm.patch +Patch60: chromium-95-libyuv-arm.patch +# https://github.com/stha09/chromium-patches/blob/master/chromium-98-MiraclePtr-gcc-ice.patch +Patch61: chromium-98-MiraclePtr-gcc-ice.patch +# https://github.com/stha09/chromium-patches/blob/master/chromium-98-WaylandFrameManager-check.patch +Patch62: chromium-98-WaylandFrameManager-check.patch # Extra CXXFLAGS for aarch64 -Patch63: chromium-91.0.4472.77-aarch64-cxxflags-addition.patch +Patch64: chromium-91.0.4472.77-aarch64-cxxflags-addition.patch # Fix issue where closure_compiler thinks java is only allowed in android builds # https://bugs.chromium.org/p/chromium/issues/detail?id=1192875 -Patch64: chromium-91.0.4472.77-java-only-allowed-in-android-builds.patch +Patch65: chromium-91.0.4472.77-java-only-allowed-in-android-builds.patch -# Silence GCC warnings during gn compile -Patch65: chromium-84.0.4147.105-gn-gcc-cleanup.patch # Fix missing cstring in remoting code -Patch66: chromium-84.0.4147.125-remoting-cstring.patch +Patch67: chromium-98.0.4758.80-remoting-cstring.patch # Apply fix_textrels hack for i686 (even without lld) -Patch67: chromium-84.0.4147.125-i686-fix_textrels.patch -# Work around binutils bug in aarch64 (F33+) -Patch68: chromium-84.0.4147.125-aarch64-clearkeycdm-binutils-workaround.patch -# Fix sandbox code to properly handle the new way that glibc handles fstat in Fedora 34+ -# Thanks to Kevin Kofler for the fix. -Patch75: chromium-90.0.4430.72-fstatfix.patch +Patch68: chromium-84.0.4147.125-i686-fix_textrels.patch + # Rawhide (f35) glibc defines SIGSTKSZ as a long instead of a constant -Patch76: chromium-88.0.4324.182-rawhide-gcc-std-max-fix.patch -# Fix symbol visibility with gcc on swiftshader's libEGL -Patch77: chromium-88.0.4324.182-gcc-fix-swiftshader-libEGL-visibility.patch +Patch76: chromium-92.0.4515.107-rawhide-gcc-std-max-fix.patch # Do not download proprietary widevine module in the background (thanks Debian) -Patch79: chromium-90.0.4430.72-widevine-no-download.patch +Patch79: chromium-93.0.4577.63-widevine-no-download.patch + # Fix crashes with components/cast_* # Thanks to Gentoo -Patch80: https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/files/chromium-89-EnumTable-crash.patch +Patch80: chromium-98.0.4758.80-EnumTable-crash.patch +# Add missing cmath header +Patch84: chromium-94.0.4606.71-remoting-missing-cmath-header.patch + +# Clean up clang-format for python3 +# thanks to Jon Nettleton +Patch86: chromium-94.0.4606.81-clang-format.patch +# include full UrlResponseHead header +Patch95: chromium-93.0.4577.63-mojo-header-fix.patch +# Fix extra qualification error +Patch97: chromium-98.0.4758.80-remoting-extra-qualification.patch +# From gentoo +Patch98: chromium-94.0.4606.71-InkDropHost-crash.patch +# Enable WebRTCPPipeWireCapturer by default +Patch99: chromium-96.0.4664.110-enable-WebRTCPipeWireCapturer-byDefault.patch + # Use lstdc++ on EPEL7 only @@ -316,10 +326,10 @@ Patch101: chromium-75.0.3770.100-epel7-stdc++.patch # el7 only patch Patch102: chromium-80.0.3987.132-el7-noexcept.patch # Work around old and missing headers on EPEL7 -Patch103: chromium-90.0.4430.93-epel7-old-headers-workarounds.patch +Patch103: chromium-98.0.4758.80-epel7-old-headers-workarounds.patch # Use old cups (chromium's code workaround breaks on gcc) # Revert: https://github.com/chromium/chromium/commit/c3213f8779ddc427e89d982514185ed5e4c94e91 -Patch104: chromium-84.0.4147.89-epel7-old-cups.patch +Patch104: chromium-98.0.4758.80-epel7-old-cups.patch # Still not wrong, but it seems like only EL needs it Patch106: chromium-77-clang.patch # ARM failures on el8 related to int clashes @@ -332,20 +342,21 @@ Patch108: chromium-85.0.4183.83-el7-old-libdrm.patch # error: no matching function for call to 'std::basic_string::erase(std::basic_string::const_iterator, __gnu_cxx::__normal_iterator >&)' # 33 | property_name.erase(property_name.cbegin(), cur); # Not sure how this EVER worked anywhere, but it only seems to fail on EPEL-7. -Patch109: chromium-91.0.4472.114-epel7-erase-fix.patch +Patch109: chromium-98.0.4758.80-epel7-erase-fix.patch # Again, not sure how epel8 is the only one to hit this... # AARCH64 neon symbols need to be prefixed too to prevent multiple definition issue at linktime Patch110: chromium-90.0.4430.93-epel8-aarch64-libpng16-symbol-prefixes.patch - +# Add additional operator== to make el7 happy. +Patch111: chromium-98.0.4758.80-el7-extra-operator==.patch # VAAPI # Upstream turned VAAPI on in Linux in 86 -Patch202: chromium-89.0.4389.72-enable-hardware-accelerated-mjpeg.patch +Patch202: chromium-98.0.4758.80-enable-hardware-accelerated-mjpeg.patch Patch203: chromium-86.0.4240.75-vaapi-i686-fpermissive.patch Patch205: chromium-86.0.4240.75-fix-vaapi-on-intel.patch # Apply these patches to work around EPEL8 issues -Patch300: chromium-89.0.4389.82-rhel8-force-disable-use_gnome_keyring.patch +Patch300: chromium-92.0.4515.107-rhel8-force-disable-use_gnome_keyring.patch # And fixes for new compilers Patch400: %{name}-gcc11.patch @@ -381,9 +392,10 @@ Source15: http://download.savannah.nongnu.org/releases/freebangfont/MuktiNarrow- Source16: https://github.com/web-platform-tests/wpt/raw/master/fonts/Ahem.ttf Source17: GardinerModBug.ttf Source18: GardinerModCat.ttf -# RHEL 7 needs newer nodejs -%if 0%{?rhel} == 7 -Source19: https://nodejs.org/dist/v10.15.3/node-v10.15.3-linux-x64.tar.gz +# RHEL 7|8 needs newer nodejs +%if 0%{?rhel} && 0%{?rhel} <= 8 +Source19: https://nodejs.org/dist/latest-v12.x/node-v12.22.6-linux-x64.tar.xz +Source21: https://nodejs.org/dist/latest-v12.x/node-v12.22.6-linux-arm64.tar.xz %endif # Bring xcb-proto with us (might need more than python on EPEL?) Source20: https://www.x.org/releases/individual/proto/xcb-proto-1.14.tar.xz @@ -437,8 +449,8 @@ BuildRequires: minizip-compat-devel # BuildRequires: minizip-devel %endif %endif -# RHEL 7's nodejs is too old -%if 0%{?rhel} == 7 +# RHEL 7|8's nodejs is too old +%if 0%{?rhel} && 0%{?rhel} <= 8 # Use bundled. %else BuildRequires: nodejs @@ -461,6 +473,8 @@ BuildRequires: libstdc++-devel, openssl-devel # Fedora tries to use system libs whenever it can. BuildRequires: bzip2-devel BuildRequires: dbus-glib-devel +# For eu-strip +BuildRequires: elfutils BuildRequires: elfutils-libelf-devel BuildRequires: flac-devel %if 0%{?bundlefreetype} @@ -527,17 +541,23 @@ BuildRequires: pkgconfig(gtk+-3.0) %else BuildRequires: pkgconfig(gtk+-2.0) %endif -BuildRequires: /usr/bin/python2 +BuildRequires: %{chromium_pybin} +%if ! %{build_with_python3} BuildRequires: python2-devel +%else +BuildRequires: python3-devel +%endif + +%if 0%{?build_with_python3} %if 0%{?bundlepylibs} # Using bundled bits, do nothing. %else -%if 0%{?fedora} -BuildRequires: python2-beautifulsoup4 -BuildRequires: python2-beautifulsoup -BuildRequires: python2-html5lib -BuildRequires: python2-markupsafe -BuildRequires: python2-ply +%if 0%{?fedora} || 0%{?rhel} >= 8 +BuildRequires: python3-beautifulsoup4 +# BuildRequires: python2-beautifulsoup +BuildRequires: python3-html5lib +BuildRequires: python3-markupsafe +BuildRequires: python3-ply %else BuildRequires: python-beautifulsoup4 BuildRequires: python-BeautifulSoup @@ -545,8 +565,30 @@ BuildRequires: python-html5lib BuildRequires: python-markupsafe BuildRequires: python-ply %endif -BuildRequires: python2-simplejson +BuildRequires: python3-simplejson +%endif +%else +%if 0%{?bundlepylibs} +# Using bundled bits, do nothing. +%else +%if 0%{?fedora} +BuildRequires: python2-beautifulsoup4 +BuildRequires: python2-beautifulsoup +BuildRequires: python2-html5lib +BuildRequires: python2-markupsafe +BuildRequires: python2-ply +%else +BuildRequires: python-beautifulsoup4 +BuildRequires: python-BeautifulSoup +BuildRequires: python-html5lib +BuildRequires: python-markupsafe +BuildRequires: python-ply +%endif +BuildRequires: python2-simplejson +%endif %endif + + %if 0%{?bundlere2} # Using bundled bits, do nothing. %else @@ -670,11 +712,19 @@ Provides: chromium-libs = %{version}-%{release} Obsoletes: chromium-libs <= %{version}-%{release} %endif +#rhel 7: ia32 x86_64 +#rhel 8+: ia32, x86_64, aarch64 +#fedora 32 or older: ia32, x86_64, aarch64 +#fedora 33+: x86_64 aarch64 only %if 0%{?rhel} == 7 ExclusiveArch: x86_64 i686 %else +%if 0%{?fedora} > 32 +ExclusiveArch: x86_64 aarch64 +%else ExclusiveArch: x86_64 i686 aarch64 %endif +%endif # Bundled bits (I'm sure I've missed some) Provides: bundled(angle) = 2422 @@ -696,7 +746,7 @@ Provides: bundled(fips181) = 2.2.3 Provides: bundled(fontconfig) = 2.12.6 %endif %if 0%{?bundlefreetype} -Provides: bundled(freetype) = 2.9.3 +Provides: bundled(freetype) = 2.11.0git %endif Provides: bundled(gperftools) = svn144 %if 0%{?bundleharfbuzz} @@ -857,7 +907,11 @@ Requires(post): systemd Requires(preun): systemd Requires(postun): systemd Requires: xorg-x11-server-Xvfb +%if 0%{?build_with_python3} +Requires: python3-psutil +%else Requires: python2-psutil +%endif %if 0%{?shared} Requires: chromium-libs%{_isa} = %{version}-%{release} %else @@ -911,38 +965,39 @@ udev. %patch5 -p1 -b .nozlibmangle %patch6 -p1 -b .nounrar %patch7 -p1 -b .widevine-hack -%patch8 -p1 -b .nofontconfigcache %patch9 -p1 -b .gcc9 %patch10 -p1 -b .widevine-other-locations -%patch11 -p1 -b .py2 +%if 0%{?build_with_python3} +%patch11 -p1 -b .py3 +%endif # Short term fixes (usually gcc and backports) %patch51 -p1 -b .gcc-remoting-constexpr %if 0%{?fedora} || 0%{?rhel} >= 8 %patch52 -p1 -b .unbundle-zlib %endif -%patch53 -p1 -b .gcc-include-memory %patch55 -p1 -b .protobuf-export %patch56 -p1 -b .missing-cstdint %patch57 -p1 -b .missing-cstring %patch58 -p1 -b .ffmpeg-deprecations -%patch59 -p1 -b .pcscan-vector-types -%patch60 -p1 -b .libyuv-aarch64 -%patch61 -p1 -b .update-highway-0.12.2 -%patch62 -p1 -b .ruy-include -%patch63 -p1 -b .aarch64-cxxflags-addition -%patch64 -p1 -b .java-only-allowed -%patch65 -p1 -b .gn-gcc-cleanup -%patch66 -p1 -b .remoting-cstring -%patch67 -p1 -b .i686-textrels -%patch68 -p1 -b .aarch64-clearkeycdm-binutils-workaround -%patch75 -p1 -b .fstatfix +%patch60 -p1 -b .libyuv-arm +%patch61 -p1 -b .MiraclePtr-gcc-ice +%patch62 -p1 -b .WaylandFrameManager-check +%patch64 -p1 -b .aarch64-cxxflags-addition +%patch65 -p1 -b .java-only-allowed +%patch67 -p1 -b .remoting-cstring +%patch68 -p1 -b .i686-textrels %if 0%{?fedora} >= 35 %patch76 -p1 -b .sigstkszfix %endif -%patch77 -p1 -b .gcc-swiftshader-visibility %patch79 -p1 -b .widevine-no-download %patch80 -p1 -b .EnumTable-crash +%patch84 -p1 -b .remoting-missing-cmath-header +%patch86 -p1 -b .clang-format-py3 +%patch95 -p1 -b .mojo-header-fix +%patch97 -p1 -b .remoting-extra-qualification +%patch98 -p1 -b .InkDropHost-crash +%patch99 -p1 -b .enable-WebRTCPipeWireCapturer-byDefault # Fedora branded user agent %if 0%{?fedora} @@ -957,6 +1012,7 @@ udev. %patch104 -p1 -b .el7cups %patch108 -p1 -b .el7-old-libdrm %patch109 -p1 -b .el7-erase-fix +%patch111 -p1 -b .el7-extra-operator-equalequal %endif %if 0%{?rhel} == 8 @@ -981,7 +1037,11 @@ udev. # Change shebang in all relevant files in this directory and all subdirectories # See `man find` for how the `-exec command {} +` syntax works +%if 0%{?build_with_python3} +find -type f -exec sed -iE '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!%{__python3}=' {} + +%else find -type f -exec sed -iE '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!%{__python2}=' {} + +%endif %if 0%{?asan} export CC="clang" @@ -1067,17 +1127,25 @@ popd # Core defines are flags that are true for both the browser and headless. CHROMIUM_CORE_GN_DEFINES="" -CHROMIUM_CORE_GN_DEFINES+=' is_debug=false' +CHROMIUM_CORE_GN_DEFINES+=' is_debug=false dcheck_always_on=false dcheck_is_configurable=false' %ifarch x86_64 aarch64 CHROMIUM_CORE_GN_DEFINES+=' system_libdir="lib64"' %endif +%if %{official_build} +CHROMIUM_CORE_GN_DEFINES+=' is_official_build=true use_thin_lto=false is_cfi=false chrome_pgo_phase=0 use_debug_fission=true' +sed -i 's|OFFICIAL_BUILD|GOOGLE_CHROME_BUILD|g' tools/generate_shim_headers/generate_shim_headers.py +# Too much debuginfo for i686 and aarch64 +%ifarch i686 aarch64 +sed -i 's|-g2|-g0|g' build/config/compiler/BUILD.gn +%endif +%endif %if %{useapikey} CHROMIUM_CORE_GN_DEFINES+=' google_api_key="%{api_key}"' %endif %if %{userestrictedapikeys} CHROMIUM_CORE_GN_DEFINES+=' google_default_client_id="%{default_client_id}" google_default_client_secret="%{default_client_secret}"' %endif -CHROMIUM_CORE_GN_DEFINES+=' is_clang=false use_sysroot=false fieldtrial_testing_like_official_build=true use_lld=false rtc_enable_symbol_export=true' +CHROMIUM_CORE_GN_DEFINES+=' is_clang=false use_sysroot=false disable_fieldtrial_testing_config=true use_lld=false rtc_enable_symbol_export=true' %if %{use_gold} CHROMIUM_CORE_GN_DEFINES+=' use_gold=true' %else @@ -1131,13 +1199,21 @@ CHROMIUM_HEADLESS_GN_DEFINES+=' use_ozone=true ozone_auto_platforms=false ozone_ CHROMIUM_HEADLESS_GN_DEFINES+=' headless_use_embedded_resources=false icu_use_data_file=false v8_use_external_startup_data=false' CHROMIUM_HEADLESS_GN_DEFINES+=' enable_nacl=false enable_print_preview=false enable_remoting=false use_alsa=false' CHROMIUM_HEADLESS_GN_DEFINES+=' use_cups=false use_dbus=false use_gio=false use_kerberos=false use_libpci=false' -CHROMIUM_HEADLESS_GN_DEFINES+=' use_pulseaudio=false use_udev=false use_gtk=false use_glib=false use_x11=false' +CHROMIUM_HEADLESS_GN_DEFINES+=' use_pulseaudio=false use_udev=false use_gtk=false use_glib=false' export CHROMIUM_HEADLESS_GN_DEFINES -%if 0%{?rhel} == 7 +%if 0%{?rhel} && 0%{?rhel} <= 8 pushd third_party/node/linux +%ifarch x86_64 tar xf %{SOURCE19} -mv node-v10.15.3-linux-x64 node-linux-x64 +mv node-v12.22.6-linux-x64 node-linux-x64 +%endif +%ifarch aarch64 +tar xf %{SOURCE21} +mv node-v12.22.6-linux-arm64 node-linux-arm64 +# This is weird, but whatever +ln -s node-linux-arm64 node-linux-x64 +%endif popd %else mkdir -p third_party/node/linux/node-linux-x64/bin @@ -1159,6 +1235,7 @@ build/linux/unbundle/remove_bundled_libraries.py \ 'base/third_party/valgrind' \ 'base/third_party/xdg_mime' \ 'base/third_party/xdg_user_dirs' \ + 'buildtools/third_party/eu-strip' \ 'buildtools/third_party/libc++' \ 'buildtools/third_party/libc++abi' \ 'chrome/third_party/mozilla_security_manager' \ @@ -1172,7 +1249,6 @@ build/linux/unbundle/remove_bundled_libraries.py \ 'third_party/angle/src/common/third_party/base' \ 'third_party/angle/src/common/third_party/smhasher' \ 'third_party/angle/src/common/third_party/xxhash' \ - 'third_party/angle/src/third_party/compiler' \ 'third_party/angle/src/third_party/libXNVCtrl' \ 'third_party/angle/src/third_party/trace_event' \ 'third_party/angle/src/third_party/volk' \ @@ -1189,7 +1265,9 @@ build/linux/unbundle/remove_bundled_libraries.py \ 'third_party/catapult/common/py_vulcanize/third_party/rcssmin' \ 'third_party/catapult/common/py_vulcanize/third_party/rjsmin' \ 'third_party/catapult/third_party/beautifulsoup4' \ + 'third_party/catapult/third_party/beautifulsoup4-4.9.3' \ 'third_party/catapult/third_party/google-endpoints' \ + 'third_party/catapult/third_party/html5lib-1.1' \ 'third_party/catapult/third_party/html5lib-python' \ 'third_party/catapult/third_party/polymer' \ 'third_party/catapult/third_party/six' \ @@ -1211,6 +1289,7 @@ build/linux/unbundle/remove_bundled_libraries.py \ 'third_party/dav1d' \ 'third_party/dawn' \ 'third_party/dawn/third_party/khronos' \ + 'third_party/dawn/third_party/tint' \ 'third_party/depot_tools' \ 'third_party/devscripts' \ 'third_party/devtools-frontend' \ @@ -1219,7 +1298,7 @@ build/linux/unbundle/remove_bundled_libraries.py \ 'third_party/devtools-frontend/src/front_end/third_party/axe-core' \ 'third_party/devtools-frontend/src/front_end/third_party/chromium' \ 'third_party/devtools-frontend/src/front_end/third_party/codemirror' \ - 'third_party/devtools-frontend/src/front_end/third_party/fabricjs' \ + 'third_party/devtools-frontend/src/front_end/third_party/diff' \ 'third_party/devtools-frontend/src/front_end/third_party/i18n' \ 'third_party/devtools-frontend/src/front_end/third_party/intl-messageformat' \ 'third_party/devtools-frontend/src/front_end/third_party/lighthouse' \ @@ -1228,6 +1307,9 @@ build/linux/unbundle/remove_bundled_libraries.py \ 'third_party/devtools-frontend/src/front_end/third_party/marked' \ 'third_party/devtools-frontend/src/front_end/third_party/puppeteer' \ 'third_party/devtools-frontend/src/front_end/third_party/wasmparser' \ + 'third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n' \ + 'third_party/devtools-frontend/src/third_party' \ + 'third_party/distributed_point_functions' \ 'third_party/dom_distiller_js' \ 'third_party/eigen3' \ 'third_party/emoji-segmenter' \ @@ -1296,15 +1378,17 @@ build/linux/unbundle/remove_bundled_libraries.py \ 'third_party/lss' \ 'third_party/lzma_sdk' \ 'third_party/mako' \ -%if 0%{?bundlepylibs} + 'third_party/maldoca' \ + 'third_party/maldoca/src/third_party/tensorflow_protos' \ + 'third_party/maldoca/src/third_party/zlibwrapper' \ 'third_party/markupsafe' \ -%endif 'third_party/mesa' \ 'third_party/metrics_proto' \ 'third_party/minigbm' \ 'third_party/modp_b64' \ 'third_party/nasm' \ 'third_party/nearby' \ + 'third_party/neon_2_sse' \ 'third_party/node' \ 'third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2' \ 'third_party/one_euro_filter' \ @@ -1349,6 +1433,7 @@ build/linux/unbundle/remove_bundled_libraries.py \ 'third_party/shell-encryption' \ 'third_party/simplejson' \ 'third_party/sinonjs' \ + 'third_party/six' \ 'third_party/skia' \ 'third_party/skia/include/third_party/skcms' \ 'third_party/skia/include/third_party/vulkan' \ @@ -1371,8 +1456,6 @@ build/linux/unbundle/remove_bundled_libraries.py \ 'third_party/tflite' \ 'third_party/tflite/src/third_party/eigen3' \ 'third_party/tflite/src/third_party/fft2d' \ - 'third_party/tflite-support' \ - 'third_party/tint' \ 'third_party/ukey2' \ 'third_party/usb_ids' \ 'third_party/usrsctp' \ @@ -1400,7 +1483,6 @@ build/linux/unbundle/remove_bundled_libraries.py \ 'third_party/zlib' \ 'third_party/zlib/google' \ 'tools/gn/src/base/third_party/icu' \ - 'tools/grit/third_party/six' \ 'url/third_party/mozilla' \ 'v8/src/third_party/siphash' \ 'v8/src/third_party/utf8-decoder' \ @@ -1409,13 +1491,6 @@ build/linux/unbundle/remove_bundled_libraries.py \ 'v8/third_party/inspector_protocol' \ --do-remove -%if ! 0%{?bundlepylibs} -# Look, I don't know. This package is spit and chewing gum. Sorry. -rm -rf third_party/markupsafe -ln -s %{python2_sitearch}/markupsafe third_party/markupsafe -# We should look on removing other python2 packages as well i.e. ply -%endif - # Fix hardcoded path in remoting code sed -i 's|/opt/google/chrome-remote-desktop|%{crd_path}|g' remoting/host/setup/daemon_controller_delegate_linux.cc @@ -1490,6 +1565,11 @@ sed -i '/aarch64)/ a \ exec "/usr/bin/ninja-build" "$@";;\' ../depot_tool %endif sed -i 's|exec "${THIS_DIR}/ninja-linux${LONG_BIT}"|exec "/usr/bin/ninja-build"|g' ../depot_tools/ninja +# Get rid of the pre-built eu-strip binary, it is x86_64 and of mysterious origin +rm -rf buildtools/third_party/eu-strip/bin/eu-strip +# Replace it with a symlink to the Fedora copy +ln -s %{_bindir}/eu-strip buildtools/third_party/eu-strip/bin/eu-strip + %if 0%{?rhel} == 7 . /opt/rh/devtoolset-%{dts_version}/enable %endif @@ -1499,24 +1579,29 @@ sed -i 's|exec "${THIS_DIR}/ninja-linux${LONG_BIT}"|exec "/usr/bin/ninja-build"| %endif # Check that there is no system 'google' module, shadowing bundled ones: +%if 0%{?build_with_python3} +if python3 -c 'import google ; print google.__path__' 2> /dev/null ; then \ + echo "Python 3 'google' module is defined, this will shadow modules of this build"; \ +%else if python2 -c 'import google ; print google.__path__' 2> /dev/null ; then \ echo "Python 2 'google' module is defined, this will shadow modules of this build"; \ +%endif exit 1 ; \ fi tools/gn/bootstrap/bootstrap.py -v --no-clean --gn-gen-args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES" -%{builddir}/gn --script-executable=/usr/bin/python2 gen --args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES" %{builddir} +%{builddir}/gn --script-executable=%{chromium_pybin} gen --args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES" %{builddir} %if %{freeworld} # do not need to do headless gen %else %if %{build_headless} -%{builddir}/gn --script-executable=/usr/bin/python2 gen --args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_HEADLESS_GN_DEFINES" %{headlessbuilddir} +%{builddir}/gn --script-executable=%{chromium_pybin} gen --args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_HEADLESS_GN_DEFINES" %{headlessbuilddir} %endif %endif %if %{build_remoting} -%{builddir}/gn --script-executable=/usr/bin/python2 gen --args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES" %{remotingbuilddir} +%{builddir}/gn --script-executable=%{chromium_pybin} gen --args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES" %{remotingbuilddir} %endif %if %{bundlelibusbx} @@ -1552,7 +1637,12 @@ tar xf %{SOURCE20} %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %endif -export PYTHONPATH="../../third_party/pyjson5/src:../../third_party/catapult/third_party/google-endpoints:../../xcb-proto-1.14" +# export PYTHONPATH="../../third_party/pyjson5/src:../../third_party/catapult/third_party/google-endpoints:../../xcb-proto-1.14" +%if 0%{?rhel} == 8 +export PYTHONPATH="../../third_party/protobuf/third_party/six:../../third_party/pyjson5/src:../../xcb-proto-1.14:../../third_party/catapult/third_party/html5lib-1.1" +%else +export PYTHONPATH="../../third_party/pyjson5/src:../../xcb-proto-1.14:../../third_party/catapult/third_party/html5lib-1.1" +%endif echo # Now do the full browser @@ -1579,6 +1669,9 @@ echo %endif %endif +# bug #827861, vk_swiftshader_icd.json not getting properly installed in out/Release +sed -e 's|${ICD_LIBRARY_PATH}|./libvk_swiftshader.so|g' third_party/swiftshader/src/Vulkan/vk_swiftshader_icd.json.tmpl > out/Release/vk_swiftshader_icd.json + %install rm -rf %{buildroot} @@ -1618,9 +1711,15 @@ rm -rf %{buildroot} cp -a *.pak locales resources icudtl.dat %{buildroot}%{chromium_path} %ifarch x86_64 i686 aarch64 cp -a swiftshader %{buildroot}%{chromium_path} + cp -a libvk_swiftshader.so* %{buildroot}%{chromium_path} + cp -a libvulkan.so* %{buildroot}%{chromium_path} + cp -a vk_swiftshader_icd.json %{buildroot}%{chromium_path} %endif cp -a chrome %{buildroot}%{chromium_path}/%{chromium_browser_channel} + # Explicitly strip chromium-browser (since we don't use debuginfo here anyway) + strip %{buildroot}%{chromium_path}/%{chromium_browser_channel} cp -a chrome_sandbox %{buildroot}%{chromium_path}/chrome-sandbox + cp -a chrome_crashpad_handler %{buildroot}%{chromium_path}/chrome_crashpad_handler cp -a ../../chrome/app/resources/manpage.1.in %{buildroot}%{_mandir}/man1/%{chromium_browser_channel}.1 sed -i "s|@@PACKAGE@@|%{chromium_browser_channel}|g" %{buildroot}%{_mandir}/man1/%{chromium_browser_channel}.1 sed -i "s|@@MENUNAME@@|%{chromium_menu_name}|g" %{buildroot}%{_mandir}/man1/%{chromium_browser_channel}.1 @@ -1717,6 +1816,8 @@ rm -rf %{buildroot} %if %{build_headless} pushd %{headlessbuilddir} cp -a headless_lib.pak headless_shell %{buildroot}%{chromium_path} + # Explicitly strip headless_shell binary + strip %{buildroot}%{chromium_path}/headless_shell popd %endif @@ -1852,6 +1953,7 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt %dir %{chromium_path} %{chromium_path}/*.bin %{chromium_path}/chrome_*.pak +%{chromium_path}/chrome_crashpad_handler %{chromium_path}/resources.pak %{chromium_path}/icudtl.dat %{chromium_path}/%{chromium_browser_channel} @@ -1859,9 +1961,6 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt %{chromium_path}/libEGL.so* %{chromium_path}/libGLESv2.so* %{chromium_path}/MEIPreload/ -%ifarch x86_64 i686 aarch64 -%{chromium_path}/swiftshader/ -%endif %dir %{chromium_path}/PepperFlash/ %if 0 %{chromium_path}/protoc @@ -1890,6 +1989,12 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt %{chromium_path}/pyproto/ %endif %{chromium_path}/resources/ +%ifarch x86_64 i686 aarch64 +%{chromium_path}/swiftshader/ +%{chromium_path}/libvk_swiftshader.so* +%{chromium_path}/libvulkan.so* +%{chromium_path}/vk_swiftshader_icd.json +%endif %dir %{chromium_path}/locales/ %lang(am) %{chromium_path}/locales/am.pak* %lang(ar) %{chromium_path}/locales/ar.pak* @@ -1948,9 +2053,11 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt %lang(zh_CN) %{chromium_path}/locales/zh-CN.pak* %lang(zh_TW) %{chromium_path}/locales/zh-TW.pak* # These are psuedolocales, not real ones. -# So we just include them always. +# They only get generated when is_official_build=false +%if ! %{official_build} %{chromium_path}/locales/ar-XB.pak* %{chromium_path}/locales/en-XA.pak* +%endif %if %{build_headless} %files headless @@ -2007,6 +2114,93 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt %changelog +* Tue Feb 8 2022 Tom Callaway - 98.0.4758.80-1 +- update to 98.0.4758.80 + +* Sat Feb 05 2022 Jiri Vanek - 96.0.4664.110-9 +- Rebuilt for java-17-openjdk as system jdk + +* Wed Jan 19 2022 Fedora Release Engineering - 96.0.4664.110-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jan 5 2022 Tom Callaway - 96.0.4664.110-7 +- i hate regex. trying again + +* Tue Jan 4 2022 Tom Callaway - 96.0.4664.110-6 +- always filter provides, was previously inside conditional for shared builds + +* Mon Jan 3 2022 Tom Callaway - 96.0.4664.110-5 +- fix provides filtering to be more inclusive (and work properly) + +* Thu Dec 30 2021 Tom Callaway - 96.0.4664.110-4 +- package up more swiftshader/angle stuff +- move swiftshader files to -common so headless can use them + +* Mon Dec 27 2021 Tom Callaway - 96.0.4664.110-3 +- have chromium-browser.sh check for wayland env vars and if found, set ozone flags appropriately + Thanks to Neal Gompa for the nudge + +* Mon Dec 20 2021 Tom Callaway - 96.0.4664.110-2 +- enable WebRTCPipeWireCapturer by default + +* Thu Dec 16 2021 Tom Callaway - 96.0.4664.110-1 +- update to 96.0.4664.110 + +* Fri Nov 19 2021 Tom Callaway - 96.0.4664.45-1 +- update to 96.0.4664.45 + +* Fri Nov 12 2021 Tom Callaway - 95.0.4638.69-1 +- update to 95.0.4638.69 + +* Fri Oct 8 2021 Tom Callaway - 94.0.4606.81-1 +- update to 94.0.4606.81 + +* Wed Oct 6 2021 Tom Callaway - 94.0.4606.71-2 +- add official_build flag +- apply upstream patch to handle nullptr correctly in PartitionGetSizeEstimate() + +* Tue Oct 5 2021 Tom Callaway - 94.0.4606.71-1 +- update to 94.0.4606.71 + +* Fri Sep 24 2021 Tom Callaway - 94.0.4606.61-1 +- update to 94.0.4606.61 + +* Thu Sep 23 2021 Tom Callaway - 94.0.4606.54-1 +- update to 94.0.4606.54 + +* Mon Sep 20 2021 Tom Callaway - 93.0.4577.82-2 +- add fix for harfbuzz v3 (thanks to Jan Beich @ FreeBSD) + +* Thu Sep 16 2021 Tom Callaway - 93.0.4577.82-1 +- update to 93.0.4577.82 + +* Thu Sep 2 2021 Tom Callaway - 93.0.4577.63-1 +- update to 93.0.4577.63 + +* Mon Aug 30 2021 Tom Callaway - 92.0.4515.159-2 +- disable userfaultd code in epel8 +- include crashpad_handler (it works a lot better when it doesn't immediately crash because of this missing file) + +* Tue Aug 17 2021 Tom Callaway - 92.0.4515.159-1 +- update to 92.0.4515.159 + +* Mon Aug 16 2021 Tom Callaway - 92.0.4515.131-1 +- update to 92.0.4515.131 +- apply upstream fix for clone3 crash + +* Mon Jul 26 2021 Tom Callaway - 92.0.4515.107-1 +- update to 92.0.4515.107 +- drop python2 deps (finally) + +* Wed Jul 21 2021 Fedora Release Engineering - 91.0.4472.164-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jul 16 2021 Tom Callaway - 91.0.4472.164-1 +- update to 91.0.4472.164 + +* Tue Jul 6 2021 Tom Callaway - 91.0.4472.114-2 +- fix ThemeService crash (thanks OpenSUSE) + * Wed Jun 23 2021 Tom Callaway - 91.0.4472.114-1 - update to 91.0.4472.114 diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index ac34ca2f..60a40b48 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -79,6 +79,7 @@ header_files=" libavcodec/x86/inline_asm.h \ libavcodec/codec_par.h \ libavcodec/dct.h \ libavcodec/dct32.h \ + libavcodec/defs.h \ libavcodec/error_resilience.h \ libavcodec/fdctdsp.h \ libavcodec/fft.h \ @@ -236,6 +237,8 @@ manual_files=" libavcodec/aarch64/fft_neon.S \ libavcodec/hpeldsp.c \ libavcodec/mdct15.c \ libavcodec/mdct_template.c \ + libavcodec/options.c \ + libavcodec/pcm.c \ libavcodec/pel_template.c \ libavcodec/utils.c \ libavcodec/videodsp.c \ @@ -255,7 +258,9 @@ manual_files=" libavcodec/aarch64/fft_neon.S \ libavutil/fixed_dsp.c \ libavutil/float_dsp.c \ libavutil/imgutils.c \ + libavutil/tx_float.c \ libavutil/tx_template.c \ + libavutil/utils.c \ libavutil/x86/cpu.c \ libavutil/x86/float_dsp_init.c \ libavutil/x86/x86inc.asm \ @@ -276,7 +281,6 @@ mp3_files=" libavcodec/aarch64/aacpsdsp_init_aarch64.c \ libavcodec/aacsbr.c \ libavcodec/aactab.c \ libavcodec/ac3tab.c \ - libavcodec/autorename_libavcodec_aacdec.c \ libavcodec/autorename_libavcodec_mpegaudiodsp.c \ libavcodec/autorename_libavcodec_sbrdsp.c \ libavcodec/cbrt_data.c \ diff --git a/sources b/sources index 5bade369..5f19837e 100644 --- a/sources +++ b/sources @@ -15,9 +15,10 @@ SHA512 (Tinos-Bold.ttf) = 54aeca804c06a4d5c57ade596e73df91a6a1c4401c4aadba55d987 SHA512 (Tinos-Italic.ttf) = d4f4f096110ef98a781a2a0e0d319317e5f84e650fe6f4d4f6b0e22a16414278217f37497b904a18540273c0e2d79d4f1faabde3b0eb5446283b318c73bafb38 SHA512 (Tinos-Regular.ttf) = 58085c5dac6d067d60ba2ab3220c4a0cc1efcf279cadfcfb8746a5e5fa1a6f6daa62750dc2051b3b2d8a51b4d2e9bb0f66594caf2253c0870ed9c7286fa45e8f SHA512 (Ahem.ttf) = aeb64b10ab9c87860714cb60b4900254b13dc52c51319256a1a3722c882026ab7c616bf628fbc2fe14e38a6003f3a481af60b52a7ed62071d28ddaf428e4e3fd -SHA512 (node-v10.15.3-linux-x64.tar.gz) = 5eb544ef706562981340a82acc79e2162c6a3e4049b4a95f69ce353ee5b0f929c60b1fc457e8249b3fb0696f82fc28c5f543f5947db19fae4e9d5c21b906bb20 SHA512 (xcb-proto-1.14.tar.xz) = de66d568163b6da2be9d6c59984f3afa3acd119a781378638045fd68018665ef5c9af98f024e9962ba3eb7c7a4d85c27ba70ffafceb2324ccc6940f34de16690 SHA512 (depot_tools.git-master.tar.gz) = dc323888812b66cc92c53a24a8a58ccf9e2961be67aa21852bd091b8b49569071f06ae9104cb58950e6253ac3a29f0db0663e9f35ef2b1ea28696efb38b42708 SHA512 (NotoSansSymbols2-Regular.ttf) = 2644b42c3fdccfe12395f9b61553aced169a0f1dc09f5a0fd7898e9d0a372ee4422b6b1cdab3c86ecc91db437e9ae8a951e64e85edc3ac9e9fca428852dbb2ad SHA512 (NotoSansTibetan-Regular.ttf) = fb5a48fcaea80eebe7d692f6fcf00d59d47658a358d0ec8e046fc559873f88bd595b2da474d2826abd9e9305f3741c69058d867b1e6048f37fe7d71b5d3af36a -SHA512 (chromium-91.0.4472.114-clean.tar.xz) = 2379fdbca889cfed28e9ab530eabcd654f16ee2d4313d684fd8eafdb9b4c25efa04e0af23323537c7a492e7913125c59ec8b53c2b7437e20496882c9af47a9be +SHA512 (node-v12.22.6-linux-arm64.tar.xz) = 87ce5eb954deb1d0debe6fa02b28a3cc675e12fca1e51d44b123ab294aa39ce0c6b8ac9eae1e7a6e32673ea2c2d480651d9ba7eea73012f0529503eebe9eb34d +SHA512 (node-v12.22.6-linux-x64.tar.xz) = e1b55c32343cb2ccc40d888c705414bebf9c46b02083d13731df79b1e79521b7277761f6bcca041e40e3a2e47c67bb8e7848aa2b919a9de5c2ebf62c4a9c7176 +SHA512 (chromium-98.0.4758.80-clean.tar.xz) = b3c95418683bc1ce24dcda8e1510fc5623ef97a9fca6574a75fb372648edaa078c715592c3f9fa0f6c0557b8edf1c3436faec093b620bef7b050a8c3aa4a2f96