From 644c757ffb94ff2f452976228fee9bbdfba762fa Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sat, 11 Jan 2025 07:17:39 +0000 Subject: automatic import of chromium --- .gitignore | 2 + ...all-to-function-memmove-that-is-neither-v.patch | 22 + ...-template-named-optional-in-namespace-std.patch | 21 + INSTALL.sh | 148 ++ bubble-contents.patch | 29 + chrome-wrapper | 38 + chromium-102-regex_pattern-array.patch | 16 + chromium-106-ffmpeg-duration.patch | 17 + chromium-117-string-convert.patch | 21 + chromium-119-assert.patch | 12 + chromium-120-make_unique-struct.patch | 12 + chromium-121-rust-clang_lib.patch | 68 + chromium-123-missing-QtGui.patch | 12 + chromium-125-compiler.patch | 277 +++ chromium-125-disable-FFmpegAllowLists.patch | 12 + chromium-125-lp155-typename.patch | 350 ++++ chromium-126-quiche-interator.patch | 12 + chromium-127-bindgen.patch | 108 ++ chromium-127-clang17-traitors.patch | 285 +++ chromium-127-constexpr.patch | 93 + chromium-127-rust-clanglib.patch | 22 + ...um-91-java-only-allowed-in-android-builds.patch | 16 + ...-disable-GlobalMediaControlsCastStartStop.patch | 13 + chromium-libusb_interrupt_event_handler.patch | 15 + chromium-master-prefs-path.patch | 16 + chromium-norar.patch | 12 + chromium-prop-codecs.patch | 17 + chromium-symbolic.svg | 30 + chromium.spec | 955 +++++++++ emplace.patch | 79 + fix_building_widevinecdm_with_chromium.patch | 11 + gcc-enable-lto.patch | 70 + gn-absl.patch | 174 ++ gn-funcs.patch | 80 + master_preferences | 30 + riscv-cpuinfo.patch | 32 + riscv-dav1d.patch | 53 + riscv-sandbox.patch | 2043 ++++++++++++++++++++ riscv-swiftshader.patch | 25 + riscv-v8.patch | 27 + sources | 2 + system-libdrm.patch | 42 + use-of-undeclared-identifier-memset.patch | 31 + 43 files changed, 5350 insertions(+) create mode 100644 0001-Fix-error-call-to-function-memmove-that-is-neither-v.patch create mode 100644 0001-Fix-no-template-named-optional-in-namespace-std.patch create mode 100644 INSTALL.sh create mode 100644 bubble-contents.patch create mode 100644 chrome-wrapper create mode 100644 chromium-102-regex_pattern-array.patch create mode 100644 chromium-106-ffmpeg-duration.patch create mode 100644 chromium-117-string-convert.patch create mode 100644 chromium-119-assert.patch create mode 100644 chromium-120-make_unique-struct.patch create mode 100644 chromium-121-rust-clang_lib.patch create mode 100644 chromium-123-missing-QtGui.patch create mode 100644 chromium-125-compiler.patch create mode 100644 chromium-125-disable-FFmpegAllowLists.patch create mode 100644 chromium-125-lp155-typename.patch create mode 100644 chromium-126-quiche-interator.patch create mode 100644 chromium-127-bindgen.patch create mode 100644 chromium-127-clang17-traitors.patch create mode 100644 chromium-127-constexpr.patch create mode 100644 chromium-127-rust-clanglib.patch create mode 100644 chromium-91-java-only-allowed-in-android-builds.patch create mode 100644 chromium-disable-GlobalMediaControlsCastStartStop.patch create mode 100644 chromium-libusb_interrupt_event_handler.patch create mode 100644 chromium-master-prefs-path.patch create mode 100644 chromium-norar.patch create mode 100644 chromium-prop-codecs.patch create mode 100644 chromium-symbolic.svg create mode 100644 chromium.spec create mode 100644 emplace.patch create mode 100644 fix_building_widevinecdm_with_chromium.patch create mode 100644 gcc-enable-lto.patch create mode 100644 gn-absl.patch create mode 100644 gn-funcs.patch create mode 100644 master_preferences create mode 100644 riscv-cpuinfo.patch create mode 100644 riscv-dav1d.patch create mode 100644 riscv-sandbox.patch create mode 100644 riscv-swiftshader.patch create mode 100644 riscv-v8.patch create mode 100644 sources create mode 100644 system-libdrm.patch create mode 100644 use-of-undeclared-identifier-memset.patch diff --git a/.gitignore b/.gitignore index e69de29..2c4a70f 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/chromium-128.0.6613.119.tar.xz +/esbuild.tar.gz diff --git a/0001-Fix-error-call-to-function-memmove-that-is-neither-v.patch b/0001-Fix-error-call-to-function-memmove-that-is-neither-v.patch new file mode 100644 index 0000000..bb9f99a --- /dev/null +++ b/0001-Fix-error-call-to-function-memmove-that-is-neither-v.patch @@ -0,0 +1,22 @@ +From 00921a941f3b5bdde37d15d59208cdc5b25dd576 Mon Sep 17 00:00:00 2001 +From: misaka00251 +Date: Wed, 25 Sep 2024 20:51:15 +0800 +Subject: [PATCH] Fix error: call to function 'memmove' that is neither visible + in the template definition nor found by argument-dependent lookup + + +diff --git a/base/containers/span.h b/base/containers/span.h +index 6fc6e8a641..2a26acc58f 100644 +--- a/base/containers/span.h ++++ b/base/containers/span.h +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + #include "base/check.h" + #include "base/compiler_specific.h" +-- +2.46.1 + diff --git a/0001-Fix-no-template-named-optional-in-namespace-std.patch b/0001-Fix-no-template-named-optional-in-namespace-std.patch new file mode 100644 index 0000000..d9fe826 --- /dev/null +++ b/0001-Fix-no-template-named-optional-in-namespace-std.patch @@ -0,0 +1,21 @@ +From e9269478656835e1313aad6d33628677994090d5 Mon Sep 17 00:00:00 2001 +From: misaka00251 +Date: Thu, 26 Sep 2024 16:53:50 +0800 +Subject: [PATCH] Fix no template named optional in namespace std + + +diff --git a/components/enterprise/connectors/common.h b/components/enterprise/connectors/common.h +index ed56eecf25..f2bd853ebb 100644 +--- a/components/enterprise/connectors/common.h ++++ b/components/enterprise/connectors/common.h +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include "base/files/file_path.h" + #include "base/supports_user_data.h" +-- +2.46.1 + diff --git a/INSTALL.sh b/INSTALL.sh new file mode 100644 index 0000000..8491753 --- /dev/null +++ b/INSTALL.sh @@ -0,0 +1,148 @@ +#!/bin/bash +set -x +while getopts s:o:l:i: option +do +case "${option}" in +s) STAGEDIR=${OPTARG};; +o) OUTPUTDIR=${OPTARG};; +l) LIBDIR=${OPTARG};; +i) ICUDATAFILE=${OPTARG};; +esac +done +SHLIB_PERMS="755" +PROGNAME="chrome" +PACKAGE="chromium-browser" +MENUNAME="Chromium Web Browser" +CHANNEL="stable" +INSTALLDIR="${LIBDIR}/chromium" + +install -m 755 -d \ + "${STAGEDIR}/${INSTALLDIR}" \ + "${STAGEDIR}/usr/bin" \ + "${STAGEDIR}/usr/share/applications" \ + "${STAGEDIR}/usr/share/metainfo" \ + "${STAGEDIR}/usr/share/man/man1" + +# app +buildfile="${OUTPUTDIR}/${PROGNAME}" +install -m 755 "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/${PROGNAME}" + +# crashpad +buildfile="${OUTPUTDIR}/chrome_crashpad_handler" +install -m 755 "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/chrome_crashpad_handler" + +# resources +install -m 644 "${OUTPUTDIR}/resources.pak" "${STAGEDIR}/${INSTALLDIR}/" +install -m 644 "${OUTPUTDIR}/chrome_100_percent.pak" "${STAGEDIR}/${INSTALLDIR}/" +install -m 644 "${OUTPUTDIR}/chrome_200_percent.pak" "${STAGEDIR}/${INSTALLDIR}/" + +# ICU data file; Necessary when the GN icu_use_data_file flag is true. +if [ "x$ICUDATAFILE" == "xtrue" ]; then + install -m 644 "${OUTPUTDIR}/icudtl.dat" "${STAGEDIR}/${INSTALLDIR}/" +fi + +# V8 snapshot files; Necessary when the GN v8_use_external_startup_data flag + # is true. + # Use v8_context_snapshot.bin instead of snapshot_blob.bin if it is available. + # TODO(crbug.com/764576): Unship snapshot_blob.bin on ChromeOS and drop this branch +install -m 644 "${OUTPUTDIR}/v8_context_snapshot.bin" "${STAGEDIR}/${INSTALLDIR}/" + +# l10n paks +install -m 755 -d "${STAGEDIR}/${INSTALLDIR}/locales/" +find "${OUTPUTDIR}/locales" -type f -name '*.pak' -print -exec \ + cp -a {} "${STAGEDIR}/${INSTALLDIR}/locales/" \; +find "${STAGEDIR}/${INSTALLDIR}/locales" -type f -print -exec chmod 644 {} \; + +# ANGLE +if [ -f "${OUTPUTDIR}/libEGL.so" ]; then + for file in libEGL.so libGLESv2.so; + do + buildfile="${OUTPUTDIR}/${file}" + install -m ${SHLIB_PERMS} "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/${file}" + done +fi + +# ANGLE's libvulkan library +if [ -f "${OUTPUTDIR}/libvulkan.so.1" ]; then + file="libvulkan.so.1" + buildfile="${OUTPUTDIR}/${file}" + install -m 755 "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/${file}" +fi + +# SwiftShader ES +if [ -f "${OUTPUTDIR}/swiftshader/libEGL.so" ]; then + install -m 755 -d "${STAGEDIR}/${INSTALLDIR}/swiftshader/" + for file in libEGL.so libGLESv2.so; + do + buildfile="${OUTPUTDIR}/swiftshader/${file}" + install -m ${SHLIB_PERMS} "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/swiftshader/${file}" + done +fi + +# SwiftShader VK +if [ -f "${OUTPUTDIR}/libvk_swiftshader.so" ]; then + install -m 755 -d "${STAGEDIR}/${INSTALLDIR}/" + file="libvk_swiftshader.so" + buildfile="${OUTPUTDIR}/${file}" + install -m ${SHLIB_PERMS} "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/${file}" +fi +sed -e 's|${ICD_LIBRARY_PATH}|./libvk_swiftshader.so|g' third_party/swiftshader/src/Vulkan/vk_swiftshader_icd.json.tmpl > ${OUTPUTDIR}/vk_swiftshader_icd.json +# Install the ICD json file to point ANGLE to libvk_swiftshader.so +install -m 644 "${OUTPUTDIR}/vk_swiftshader_icd.json" "${STAGEDIR}/${INSTALLDIR}/" + +# QT shim +if [ -f "${OUTPUTDIR}/libqt5_shim.so" ]; then + file="libqt5_shim.so" + buildfile="${OUTPUTDIR}/${file}" + install -m ${SHLIB_PERMS} "${buildfile}" "${STAGEDIR}/${INSTALLDIR}/${file}" +fi + +# default apps +if [ -d "${OUTPUTDIR}/default_apps" ]; then + cp -a "${OUTPUTDIR}/default_apps" "${STAGEDIR}/${INSTALLDIR}/" + find "${STAGEDIR}/${INSTALLDIR}/default_apps" -type d -exec chmod 755 '{}' \; + find "${STAGEDIR}/${INSTALLDIR}/default_apps" -type f -exec chmod 644 '{}' \; +fi + +# launcher script and symlink +sed \ + -e "s#@@PROGNAME@@#${PROGNAME}#g" \ + -e "s#@@CHANNEL@@#${CHANNEL}#g" \ + "chrome/installer/linux/common/wrapper" > "${STAGEDIR}/${INSTALLDIR}/chrome-wrapper" +chmod 755 "${STAGEDIR}/${INSTALLDIR}/chrome-wrapper" +ln -s "${INSTALLDIR}/chrome-wrapper" "${STAGEDIR}/usr/bin/${PACKAGE}" + +# app icons +for size in 16 32; +do + icon="chrome/app/theme/default_100_percent/chromium/product_logo_${size}.png" + installpath="${STAGEDIR}/usr/share/icons/hicolor/${size}x${size}/apps/chromium-browser.png" + install -D -m 644 ${icon} ${installpath} +done +for size in 24 48 64 128 256; +do + icon="chrome/app/theme/chromium/product_logo_${size}.png" + installpath="${STAGEDIR}/usr/share/icons/hicolor/${size}x${size}/apps/chromium-browser.png" + install -D -m 644 ${icon} ${installpath} +done + +# desktop integration +## AppData +install -m 644 "chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml" \ +"${STAGEDIR}/usr/share/metainfo/${PACKAGE}.appdata.xml" + +## Desktop file +sed \ + -e "s#@@MENUNAME@@#${MENUNAME}#g" \ + -e "s#@@USR_BIN_SYMLINK_NAME@@#${PACKAGE}#g" \ + -e "s#@@PACKAGE@@#${PACKAGE}#g" \ + "chrome/installer/linux/common/desktop.template" > "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" +chmod 644 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" + +# documentation +sed \ + -e "s#@@MENUNAME@@#${MENUNAME}#g" \ + -e "s#@@PACKAGE@@#${PACKAGE}#g" \ + "chrome/app/resources/manpage.1.in" > "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1" +gzip -9n "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1" +chmod 644 "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1.gz" diff --git a/bubble-contents.patch b/bubble-contents.patch new file mode 100644 index 0000000..5065b12 --- /dev/null +++ b/bubble-contents.patch @@ -0,0 +1,29 @@ +In file included from ../../chrome/browser/ui/commerce/commerce_ui_tab_helper.cc:28: +In file included from ../../chrome/browser/ui/views/side_panel/side_panel_web_ui_view.h:12: +../../chrome/browser/ui/views/bubble/bubble_contents_wrapper.h:153:9: error: static assertion expression is not an integral constant expression + views_metrics::IsValidWebUINameVariant("." + T::GetWebUIName())); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/unique_ptr.h:1065:34: note: in instantiation of member function 'BubbleContentsWrapperT::BubbleContentsWrapperT' requested here + { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); } + ^ +../../chrome/browser/ui/commerce/commerce_ui_tab_helper.cc:458:16: note: in instantiation of function template specialization 'std::make_unique, GURL, Profile *, int, bool, bool>' requested here + std::make_unique>( + ^ +/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_construct.h:97:14: note: construction of subobject of member '_M_local_buf' of union with active member '_M_allocated_capacity' is not allowed in a constant expression + { return ::new((void*)__location) _Tp(std::forward<_Args>(__args)...); } + ^ +/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/char_traits.h:351:4: note: in call to 'construct_at(&ShoppingInsightsSidePanelUI::GetWebUIName().._M_local_buf[0], char())' + std::construct_at(__builtin_addressof(__c1), __c2); + ^ + + +--- a/chrome/browser/ui/webui/top_chrome/webui_contents_wrapper.h ++++ b/chrome/browser/ui/webui/top_chrome/webui_contents_wrapper.h +@@ -185,7 +185,6 @@ class WebUIContentsWrapperT : public Web + supports_draggable_regions, + T::GetWebUIName()), + webui_url_(webui_url) { +- static_assert(views_metrics::IsValidWebUIName("." + T::GetWebUIName())); + if (is_ready_to_show()) { + CHECK(GetWebUIController()); + GetWebUIController()->set_embedder(weak_ptr_factory_.GetWeakPtr()); diff --git a/chrome-wrapper b/chrome-wrapper new file mode 100644 index 0000000..10e983d --- /dev/null +++ b/chrome-wrapper @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Let the wrapped binary know that it has been run through the wrapper. +export CHROME_WRAPPER="`readlink -f "$0"`" + +HERE="`dirname "$CHROME_WRAPPER"`" + +# Always use our versions of ffmpeg libs. +# This also makes RPMs find the compatibly-named library symlinks. +export LD_LIBRARY_PATH="$HERE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" + +export CHROME_VERSION_EXTRA="stable" + +# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120 +export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME + +# Allow root usage +no_sandbox= +if [ "`id -u`" == "0" ]; then + no_sandbox=--no-sandbox +fi +# If uname is riscv64, then allow usage too +if [ "`uname -m`" == "riscv64" ]; then + no_sandbox=--no-sandbox +fi + +# Sanitize std{in,out,err} because they'll be shared with untrusted child +# processes (http://crbug.com/376567). +exec < /dev/null +exec > >(exec cat) +exec 2> >(exec cat >&2) + +# Note: exec -a below is a bashism. +exec -a "$0" "$HERE/chrome" $no_sandbox "$@" diff --git a/chromium-102-regex_pattern-array.patch b/chromium-102-regex_pattern-array.patch new file mode 100644 index 0000000..2931937 --- /dev/null +++ b/chromium-102-regex_pattern-array.patch @@ -0,0 +1,16 @@ +Index: chromium-123.0.6312.46/components/autofill/core/browser/BUILD.gn +=================================================================== +--- chromium-123.0.6312.46.orig/components/autofill/core/browser/BUILD.gn ++++ chromium-123.0.6312.46/components/autofill/core/browser/BUILD.gn +@@ -58,6 +58,11 @@ action("regex_patterns_inl_h") { + } + + static_library("browser") { ++ if (is_clang) { ++ cflags = [ ++ "-fbracket-depth=1000", ++ ] ++ } + sources = [ + "address_data_cleaner.cc", + "address_data_cleaner.h", diff --git a/chromium-106-ffmpeg-duration.patch b/chromium-106-ffmpeg-duration.patch new file mode 100644 index 0000000..bef339e --- /dev/null +++ b/chromium-106-ffmpeg-duration.patch @@ -0,0 +1,17 @@ +Index: chromium-106.0.5249.91/media/filters/audio_file_reader.cc +=================================================================== +--- chromium-106.0.5249.91.orig/media/filters/audio_file_reader.cc ++++ chromium-106.0.5249.91/media/filters/audio_file_reader.cc +@@ -243,10 +243,10 @@ bool AudioFileReader::OnNewFrame( + // silence from being output. In the case where we are also discarding some + // portion of the packet (as indicated by a negative pts), we further want to + // adjust the duration downward by however much exists before zero. +- if (audio_codec_ == AudioCodec::kAAC && frame->duration) { ++ if (audio_codec_ == AudioCodec::kAAC && frame->pkt_duration) { + const base::TimeDelta pkt_duration = ConvertFromTimeBase( + glue_->format_context()->streams[stream_index_]->time_base, +- frame->duration + std::min(static_cast(0), frame->pts)); ++ frame->pkt_duration + std::min(static_cast(0), frame->pts)); + const base::TimeDelta frame_duration = + base::Seconds(frames_read / static_cast(sample_rate_)); + diff --git a/chromium-117-string-convert.patch b/chromium-117-string-convert.patch new file mode 100644 index 0000000..cb48e4b --- /dev/null +++ b/chromium-117-string-convert.patch @@ -0,0 +1,21 @@ +diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.cc.me chromium-117.0.5938.62/net/dns/host_resolver_cache.cc +diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me chromium-117.0.5938.62/net/dns/host_resolver_cache.h +--- chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me 2023-09-14 15:21:24.632965004 +0200 ++++ chromium-117.0.5938.62/net/dns/host_resolver_cache.h 2023-09-15 09:15:48.511300845 +0200 +@@ -143,12 +143,14 @@ class NET_EXPORT HostResolverCache final + } + + bool operator()(const Key& lhs, const KeyRef& rhs) const { ++ const std::string rhs_domain_name{rhs.domain_name}; + return std::tie(lhs.domain_name, lhs.network_anonymization_key) < +- std::tie(rhs.domain_name, *rhs.network_anonymization_key); ++ std::tie(rhs_domain_name, *rhs.network_anonymization_key); + } + + bool operator()(const KeyRef& lhs, const Key& rhs) const { +- return std::tie(lhs.domain_name, *lhs.network_anonymization_key) < ++ const std::string lhs_domain_name{lhs.domain_name}; ++ return std::tie(lhs_domain_name, *lhs.network_anonymization_key) < + std::tie(rhs.domain_name, rhs.network_anonymization_key); + } + }; diff --git a/chromium-119-assert.patch b/chromium-119-assert.patch new file mode 100644 index 0000000..6c502f1 --- /dev/null +++ b/chromium-119-assert.patch @@ -0,0 +1,12 @@ +diff -up chromium-119.0.6045.59/v8/src/base/small-vector.h.than chromium-119.0.6045.59/v8/src/base/small-vector.h +--- chromium-119.0.6045.59/v8/src/base/small-vector.h.than 2023-11-01 16:13:12.645301345 +0100 ++++ chromium-119.0.6045.59/v8/src/base/small-vector.h 2023-11-01 16:13:29.660610182 +0100 +@@ -22,7 +22,7 @@ template ::value); + + public: diff --git a/chromium-120-make_unique-struct.patch b/chromium-120-make_unique-struct.patch new file mode 100644 index 0000000..c848f46 --- /dev/null +++ b/chromium-120-make_unique-struct.patch @@ -0,0 +1,12 @@ +diff --git a/service_worker_global_scope.h b/service_worker_global_scope.h.new +index ac4cac0..8c7d744 100644 +--- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h ++++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h +@@ -777,6 +777,7 @@ class MODULES_EXPORT ServiceWorkerGlobalScope final + blink::BlinkStorageKey storage_key_; + + struct RaceNetworkRequestInfo { ++ RaceNetworkRequestInfo(int _fetch_event_id, String _token, mojo::PendingRemote _url_loader_factory) : fetch_event_id{_fetch_event_id}, token{_token}, url_loader_factory{std::move(_url_loader_factory)} {} + int fetch_event_id; + String token; + mojo::PendingRemote diff --git a/chromium-121-rust-clang_lib.patch b/chromium-121-rust-clang_lib.patch new file mode 100644 index 0000000..0701fd2 --- /dev/null +++ b/chromium-121-rust-clang_lib.patch @@ -0,0 +1,68 @@ +From ce943790ea147d492f317097eb707745f78193a1 Mon Sep 17 00:00:00 2001 +From: misaka00251 +Date: Fri, 29 Mar 2024 15:12:35 +0800 +Subject: [PATCH] Fix rust clang lib for openEuler + +--- + build/config/clang/BUILD.gn | 31 +++++++++++++++++++++++++++++-- + 1 file changed, 29 insertions(+), 2 deletions(-) + +diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn +index d3054d1..8b956ed 100644 +--- a/build/config/clang/BUILD.gn ++++ b/build/config/clang/BUILD.gn +@@ -105,6 +105,7 @@ template("clang_lib") { + _prefix = "lib" + _suffix = "" + _ext = "a" ++ _libprefix = "" + if (is_win) { + _dir = "windows" + _prefix = "" +@@ -120,7 +121,33 @@ template("clang_lib") { + } + } else if (is_apple) { + _dir = "darwin" +- } else if (is_linux || is_chromeos) { ++ } else if (is_linux) { ++ _libprefix = "64" ++ if (current_cpu == "x64") { ++ if (clang_version == "17") { ++ _dir = "x86_64-openEuler-linux-gnu" ++ } else { ++ _dir = "linux" ++ _suffix ="-x86_64" ++ } ++ } else if (current_cpu == "arm64") { ++ if (clang_version == "17") { ++ _dir = "aarch64-openEuler-linux-gnu" ++ } else { ++ _dir = "linux" ++ _suffix = "-aarch64" ++ } ++ } else if (current_cpu == "riscv64") { ++ if (clang_version == "17") { ++ _dir = "riscv64-openEuler-linux-gnu" ++ } else { ++ _dir = "linux" ++ _suffix = "-riscv64" ++ } ++ } else { ++ assert(false) # Unhandled cpu type ++ } ++ } else if (is_chromeos) { + if (current_cpu == "x64") { + _dir = "x86_64-unknown-linux-gnu" + } else if (current_cpu == "x86") { +@@ -159,7 +186,7 @@ template("clang_lib") { + assert(false) # Unhandled target platform + } + +- _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib" ++ _clang_lib_dir = "$clang_base_path/lib${_libprefix}/clang/$clang_version/lib/" + _lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}" + libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ] + } +-- +2.39.3 (Apple Git-146) + diff --git a/chromium-123-missing-QtGui.patch b/chromium-123-missing-QtGui.patch new file mode 100644 index 0000000..5260105 --- /dev/null +++ b/chromium-123-missing-QtGui.patch @@ -0,0 +1,12 @@ +diff --git a/ui/qt/BUILD.gn b/ui/qt/BUILD.gn.new +index 2da7845..02ae3c8 100644 +--- a/ui/qt/BUILD.gn ++++ b/ui/qt/BUILD.gn +@@ -61,6 +61,7 @@ template("qt_shim") { + packages = [ + "Qt" + invoker.qt_version + "Core", + "Qt" + invoker.qt_version + "Widgets", ++ "Qt" + invoker.qt_version + "Gui", + ] + } + diff --git a/chromium-125-compiler.patch b/chromium-125-compiler.patch new file mode 100644 index 0000000..a6322ae --- /dev/null +++ b/chromium-125-compiler.patch @@ -0,0 +1,277 @@ +From 307a0f63dd9b118f4b8470ed3d7567e81fdb7a6d Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Tue, 15 Nov 2022 10:27:58 +0000 +Subject: [PATCH] Disable various compiler configs + +--- + build/config/compiler/BUILD.gn | 134 +++++---------------------------- + 1 file changed, 17 insertions(+), 117 deletions(-) + +Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn +=================================================================== +--- chromium-126.0.6478.8.orig/build/config/compiler/BUILD.gn ++++ chromium-126.0.6478.8/build/config/compiler/BUILD.gn +@@ -305,9 +305,7 @@ config("compiler") { + + configs += [ + # See the definitions below. +- ":clang_revision", + ":rustc_revision", +- ":compiler_cpu_abi", + ":compiler_codegen", + ":compiler_deterministic", + ] +@@ -554,55 +554,6 @@ config("compiler") { + ldflags += [ "-Wl,-z,keep-text-section-prefix" ] + } + +- if (is_clang && !is_nacl) { +- cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] +- if (save_reproducers_on_lld_crash && use_lld) { +- ldflags += [ +- "-fcrash-diagnostics=all", +- "-fcrash-diagnostics-dir=" + clang_diagnostic_dir, +- ] +- } +- +- # TODO(hans): Remove this once Clang generates better optimized debug info +- # by default. https://crbug.com/765793 +- cflags += [ +- "-mllvm", +- "-instcombine-lower-dbg-declare=0", +- ] +- if (!is_debug && use_thin_lto && is_a_target_toolchain) { +- if (is_win) { +- ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ] +- } else { +- ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ] +- } +- } +- +- # TODO(crbug.com/40283598): This causes binary size growth and potentially +- # other problems. +- # TODO(crbug.com/40284925): This isn't supported by Cronet's mainline llvm version. +- if (default_toolchain != "//build/toolchain/cros:target" && +- !llvm_android_mainline) { +- cflags += [ +- "-mllvm", +- "-split-threshold-for-reg-with-hint=0", +- ] +- if (use_thin_lto && is_a_target_toolchain) { +- if (is_win) { +- ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ] +- } else { +- ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ] +- } +- } +- } +- +- # TODO(crbug.com/40192287): Investigate why/if this should be needed. +- if (is_win) { +- cflags += [ "/clang:-ffp-contract=off" ] +- } else { +- cflags += [ "-ffp-contract=off" ] +- } +- } +- + # C11/C++11 compiler flags setup. + # --------------------------- + if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) || +@@ -1538,52 +1489,6 @@ config("compiler_deterministic") { + } + } + +- # Makes builds independent of absolute file path. +- if (is_clang && strip_absolute_paths_from_debug_symbols) { +- # If debug option is given, clang includes $cwd in debug info by default. +- # For such build, this flag generates reproducible obj files even we use +- # different build directory like "out/feature_a" and "out/feature_b" if +- # we build same files with same compile flag. +- # Other paths are already given in relative, no need to normalize them. +- if (is_nacl) { +- # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here. +- cflags += [ +- "-Xclang", +- "-fdebug-compilation-dir", +- "-Xclang", +- ".", +- ] +- } else { +- # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir= +- # and -fcoverage-compilation-dir=. +- cflags += [ "-ffile-compilation-dir=." ] +- +- # Convert absolute paths to relative paths. Expands to, for example: +- # -file-prefix-map /path/to/chromium/src=../.. +- swiftflags += [ +- "-file-prefix-map", +- rebase_path("//.", "") + "=" + rebase_path("//.", root_build_dir), +- ] +- } +- if (!is_win) { +- # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167) +- asmflags = [ "-Wa,-fdebug-compilation-dir,." ] +- } +- +- if (is_win && use_lld) { +- if (symbol_level == 2 || (is_clang && using_sanitizer)) { +- # Absolutize source file paths for PDB. Pass the real build directory +- # if the pdb contains source-level debug information and if linker +- # reproducibility is not critical. +- ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ] +- } else { +- # Use a fake fixed base directory for paths in the pdb to make the pdb +- # output fully deterministic and independent of the build directory. +- ldflags += [ "/PDBSourcePath:o:\fake\prefix" ] +- } +- } +- } +- + # Tells the compiler not to use absolute paths when passing the default + # paths to the tools it invokes. We don't want this because we don't + # really need it and it can mess up the RBE cache entries. +@@ -1602,28 +1507,6 @@ config("compiler_deterministic") { + } + } + +-config("clang_revision") { +- if (is_clang && clang_base_path == default_clang_base_path && +- current_os != "zos") { +- update_args = [ +- "--print-revision", +- "--verify-version=$clang_version", +- ] +- if (llvm_force_head_revision) { +- update_args += [ "--llvm-force-head-revision" ] +- } +- clang_revision = exec_script("//tools/clang/scripts/update.py", +- update_args, +- "trim string") +- +- # This is here so that all files get recompiled after a clang roll and +- # when turning clang on or off. (defines are passed via the command line, +- # and build system rebuild things when their commandline changes). Nothing +- # should ever read this define. +- defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ] +- } +-} +- + config("rustc_revision") { + if (rustc_revision != "") { + # Similar to the above config, this is here so that all files get recompiled +@@ -1983,10 +1871,6 @@ config("chromium_code") { + } + } else { + cflags = [ "-Wall" ] +- if (is_clang) { +- # Enable extra warnings for chromium_code when we control the compiler. +- cflags += [ "-Wextra" ] +- } + + # In Chromium code, we define __STDC_foo_MACROS in order to get the + # C99 macros on Mac and Linux. +@@ -1995,24 +1879,6 @@ config("chromium_code") { + "__STDC_FORMAT_MACROS", + ] + +- if (!is_debug && !using_sanitizer && current_cpu != "s390x" && +- current_cpu != "s390" && current_cpu != "ppc64" && +- current_cpu != "mips" && current_cpu != "mips64" && +- current_cpu != "riscv64" && current_cpu != "loong64") { +- # Non-chromium code is not guaranteed to compile cleanly with +- # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are +- # disabled, so only do that for Release build. +- fortify_level = "2" +- +- # ChromeOS's toolchain supports a high-quality _FORTIFY_SOURCE=3 +- # implementation with a few custom glibc patches. Use that if it's +- # available. +- if (is_chromeos_device && !lacros_use_chromium_toolchain) { +- fortify_level = "3" +- } +- defines += [ "_FORTIFY_SOURCE=" + fortify_level ] +- } +- + if (is_apple) { + cflags_objc = [ "-Wimplicit-retain-self" ] + cflags_objcc = [ "-Wimplicit-retain-self" ] +@@ -2442,7 +2325,8 @@ config("default_stack_frames") { + # [0]: https://pinpoint-dot-chromeperf.appspot.com/job/147634a8be0000 + # [1]: https://pinpoint-dot-chromeperf.appspot.com/job/132bc772be0000 + # [2]: https://crrev.com/c/5447532 +-config("optimize") { ++config("optimize") { } ++config("xoptimize") { + if (is_win) { + # clang-cl's /O2 corresponds to clang's -O3, and really want -O2 for + # consistency with the other platforms. +@@ -2450,7 +2317,8 @@ config("optimize") { + } + + # Turn off optimizations. +-config("no_optimize") { ++config("no_optimize") { } ++config("xno_optimize") { + if (is_win) { + cflags = [ + "/Od", # Disable optimization. +@@ -2490,7 +2358,8 @@ config("no_optimize") { + # Turns up the optimization level. Used to explicitly enable -O2 instead of + # -Os for select targets on platforms that use optimize_for_size. No-op + # elsewhere. +-config("optimize_max") { ++config("optimize_max") { } ++config("xoptimize_max") { + if (is_nacl && is_nacl_irt) { + # The NaCl IRT is a special case and always wants its own config. + # Various components do: +@@ -2523,7 +2392,8 @@ config("optimize_max") { + # + # TODO(crbug.com/41259697) - rework how all of these configs are related + # so that we don't need this disclaimer. +-config("optimize_speed") { ++config("optimize_speed") { } ++config("xoptimize_speed") { + if (is_nacl && is_nacl_irt) { + # The NaCl IRT is a special case and always wants its own config. + # Various components do: +@@ -2552,7 +2422,8 @@ config("optimize_speed") { + } + } + +-config("optimize_fuzzing") { ++config("optimize_fuzzing") { } ++config("xoptimize_fuzzing") { + cflags = [ "-O1" ] + common_optimize_on_cflags + rustflags = [ "-Copt-level=1" ] + ldflags = common_optimize_on_ldflags +@@ -2685,7 +2556,8 @@ config("win_pdbaltpath") { + } + + # Full symbols. +-config("symbols") { ++config("symbols") { } ++config("xsymbols") { + rustflags = [] + if (is_win) { + if (is_clang) { +@@ -2835,7 +2707,8 @@ config("symbols") { + # Minimal symbols. + # This config guarantees to hold symbol for stack trace which are shown to user + # when crash happens in unittests running on buildbot. +-config("minimal_symbols") { ++config("minimal_symbols") { } ++config("xminimal_symbols") { + rustflags = [] + if (is_win) { + # Functions, files, and line tables only. +@@ -2920,7 +2793,8 @@ config("minimal_symbols") { + # This configuration contains function names only. That is, the compiler is + # told to not generate debug information and the linker then just puts function + # names in the final debug information. +-config("no_symbols") { ++config("no_symbols") { } ++config("xno_symbols") { + if (is_win) { + ldflags = [ "/DEBUG" ] + diff --git a/chromium-125-disable-FFmpegAllowLists.patch b/chromium-125-disable-FFmpegAllowLists.patch new file mode 100644 index 0000000..72761b7 --- /dev/null +++ b/chromium-125-disable-FFmpegAllowLists.patch @@ -0,0 +1,12 @@ +diff -up chromium-122.0.6261.29/media/base/media_switches.cc.disable-FFmpegAllowLists chromium-122.0.6261.29/media/base/media_switches.cc +--- chromium-122.0.6261.29/media/base/media_switches.cc.disable-FFmpegAllowLists 2024-02-12 15:56:50.703196471 +0100 ++++ chromium-122.0.6261.29/media/base/media_switches.cc 2024-02-12 17:08:42.266076401 +0100 +@@ -1753,7 +1753,7 @@ + // Enables FFmpeg allow lists for supported codecs / containers. + BASE_FEATURE(kFFmpegAllowLists, + "FFmpegAllowLists", +- base::FEATURE_ENABLED_BY_DEFAULT); ++ base::FEATURE_DISABLED_BY_DEFAULT); + + #if BUILDFLAG(IS_WIN) + // Enables audio offload when supported by endpoints. diff --git a/chromium-125-lp155-typename.patch b/chromium-125-lp155-typename.patch new file mode 100644 index 0000000..e1a4e48 --- /dev/null +++ b/chromium-125-lp155-typename.patch @@ -0,0 +1,350 @@ + +fixed error: missing 'typename' prior to dependent type name + +Index: chromium-123.0.6312.46/base/containers/map_util.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/containers/map_util.h ++++ chromium-123.0.6312.46/base/containers/map_util.h +@@ -42,7 +42,7 @@ constexpr internal::MappedType* Fin + template >::element_type> ++ typename std::pointer_traits>::element_type> + constexpr const MappedElementType* FindPtrOrNull(const Map& map, + const Key& key) { + auto it = map.find(key); +@@ -60,7 +60,7 @@ + template >::element_type> ++ typename std::pointer_traits>::element_type> + constexpr MappedElementType* FindPtrOrNull(Map& map, const Key& key) { + auto it = map.find(key); + return it != map.end() ? base::to_address(it->second) : nullptr; +Index: chromium-123.0.6312.46/base/functional/bind_internal.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/functional/bind_internal.h ++++ chromium-123.0.6312.46/base/functional/bind_internal.h +@@ -1497,11 +1497,11 @@ template + struct ParamCanBeBound { + private: +- using UnwrappedParam = BindArgument::template ForwardedAs< ++ using UnwrappedParam = typename BindArgument::template ForwardedAs< + Unwrapped>::template ToParamWithType; +- using ParamStorage = BindArgument::template ToParamWithType< ++ using ParamStorage = typename BindArgument::template ToParamWithType< + Param>::template StoredAs; +- using BoundStorage = ++ using BoundStorage = typename + BindArgument::template BoundAs::template StoredAs; + + template +-SortedItems::const_iterator GetLastIter(const SortedItems& cache) { ++typename SortedItems::const_iterator GetLastIter(const SortedItems& cache) { + CHECK(!cache.empty()); + auto it = cache.end(); + return std::prev(it); +@@ -1090,9 +1090,9 @@ bool DownloadBubbleUpdateService::CacheM + } + + template +-SortedItems::iterator ++typename SortedItems::iterator + DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter( +- SortedItems::iterator iter, ++ typename SortedItems::iterator iter, + SortedItems& cache, + IterMap& iter_map) { + CHECK(iter != cache.end()); +Index: chromium-123.0.6312.46/components/optimization_guide/core/tflite_model_executor.h +=================================================================== +--- chromium-123.0.6312.46.orig/components/optimization_guide/core/tflite_model_executor.h ++++ chromium-123.0.6312.46/components/optimization_guide/core/tflite_model_executor.h +@@ -242,7 +242,7 @@ class TFLiteModelExecutor : public Model + void SendForBatchExecution( + BatchExecutionCallback callback_on_complete, + base::TimeTicks start_time, +- ModelExecutor::ConstRefInputVector inputs) ++ typename ModelExecutor::ConstRefInputVector inputs) + override { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -264,7 +264,7 @@ class TFLiteModelExecutor : public Model + // Starts the synchronous execution of the model. Returns model outputs. + // Model needs to be loaded. Synchronous calls do not load or unload model. + std::vector> SendForBatchExecutionSync( +- ModelExecutor::ConstRefInputVector inputs) ++ typename ModelExecutor::ConstRefInputVector inputs) + override { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -422,7 +422,7 @@ class TFLiteModelExecutor : public Model + // executes it on the model execution thread. + void LoadModelFileAndBatchExecute( + BatchExecutionCallback callback_on_complete, +- ModelExecutor::ConstRefInputVector inputs) { ++ typename ModelExecutor::ConstRefInputVector inputs) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + +@@ -439,7 +439,7 @@ class TFLiteModelExecutor : public Model + + // Batch executes the loaded model for inputs. + void BatchExecuteLoadedModel( +- ModelExecutor::ConstRefInputVector inputs, ++ typename ModelExecutor::ConstRefInputVector inputs, + std::vector>* outputs) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -499,7 +499,7 @@ class TFLiteModelExecutor : public Model + // Unloads the model if needed. + void BatchExecuteLoadedModelAndRunCallback( + BatchExecutionCallback callback_on_complete, +- ModelExecutor::ConstRefInputVector inputs, ++ typename ModelExecutor::ConstRefInputVector inputs, + ExecutionStatus execution_status) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +Index: chromium-123.0.6312.46/mojo/public/cpp/bindings/array_traits.h +=================================================================== +--- chromium-123.0.6312.46.orig/mojo/public/cpp/bindings/array_traits.h ++++ chromium-123.0.6312.46/mojo/public/cpp/bindings/array_traits.h +@@ -90,7 +90,7 @@ template + { c[i] } -> std::same_as; + } + struct ArrayTraits { +- using Element = Container::value_type; ++ using Element = typename Container::value_type; + + // vector-like containers have no built-in null. + static bool IsNull(const Container& c) { return false; } +Index: chromium-123.0.6312.46/third_party/blink/renderer/bindings/core/v8/async_iterable.h +=================================================================== +--- chromium-123.0.6312.46.orig/third_party/blink/renderer/bindings/core/v8/async_iterable.h ++++ chromium-123.0.6312.46/third_party/blink/renderer/bindings/core/v8/async_iterable.h +@@ -245,7 +245,7 @@ + private: + virtual IterationSource* CreateIterationSource( + ScriptState* script_state, +- IterationSource::Kind kind, ++ typename IterationSource::Kind kind, + InitArgs... args, + ExceptionState& exception_state) = 0; + }; +@@ -291,7 +291,7 @@ + private: + virtual IterationSource* CreateIterationSource( + ScriptState* script_state, +- IterationSource::Kind kind, ++ typename IterationSource::Kind kind, + InitArgs... args, + ExceptionState& exception_state) = 0; + }; +Index: chromium-123.0.6312.46/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc +=================================================================== +--- chromium-123.0.6312.46.orig/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc ++++ chromium-123.0.6312.46/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc +@@ -210,7 +210,7 @@ class HTMLFastPathParser { + using Span = base::span; + using USpan = base::span; + // 32 matches that used by HTMLToken::Attribute. +- typedef std::conditional, ++ typedef typename std::conditional, + UCharLiteralBuffer<32>, + LCharLiteralBuffer<32>>::type LiteralBufferType; + static_assert(std::is_same_v || std::is_same_v); +Index: chromium-123.0.6312.46/base/functional/function_ref.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/functional/function_ref.h ++++ chromium-123.0.6312.46/base/functional/function_ref.h +@@ -64,7 +64,7 @@ class FunctionRef; + template + class FunctionRef { + template ::RunType> ++ typename RunType = typename internal::FunctorTraits::RunType> + static constexpr bool kCompatibleFunctor = + std::convertible_to, R> && + std::same_as, internal::TypeList>; +Index: chromium-123.0.6312.46/base/containers/heap_array.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/containers/heap_array.h ++++ chromium-123.0.6312.46/base/containers/heap_array.h +@@ -32,8 +32,8 @@ + static_assert(!std::is_reference_v, + "HeapArray cannot hold reference types"); + +- using iterator = base::span::iterator; +- using const_iterator = base::span::iterator; ++ using iterator = typename base::span::iterator; ++ using const_iterator = typename base::span::iterator; + // We don't put this default value in the template parameter list to allow the + // static_assert on is_reference_v to give a nicer error message. + using deleter_type = std:: +Index: chromium-123.0.6312.46/mojo/public/cpp/bindings/type_converter.h +=================================================================== +--- chromium-123.0.6312.46.orig/mojo/public/cpp/bindings/type_converter.h ++++ chromium-123.0.6312.46/mojo/public/cpp/bindings/type_converter.h +@@ -127,7 +127,7 @@ using VecValueType = typename Vec::value + + template + using VecPtrLikeUnderlyingValueType = +- std::pointer_traits>::element_type; ++ typename std::pointer_traits>::element_type; + + } // namespace internal + +Index: chromium-123.0.6312.46/third_party/blink/renderer/platform/wtf/hash_table.h +=================================================================== +--- chromium-123.0.6312.46.orig/third_party/blink/renderer/platform/wtf/hash_table.h ++++ chromium-123.0.6312.46/third_party/blink/renderer/platform/wtf/hash_table.h +@@ -2004,7 +2004,7 @@ struct HashTableConstIteratorAdapter { + static_assert(!IsTraceable::value); + + using iterator_category = std::bidirectional_iterator_tag; +- using value_type = HashTableType::ValueType; ++ using value_type = typename HashTableType::ValueType; + using difference_type = ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; +@@ -2056,7 +2056,7 @@ struct HashTableConstIteratorAdapter< + + public: + using iterator_category = std::bidirectional_iterator_tag; +- using value_type = HashTableType::ValueType; ++ using value_type = typename HashTableType::ValueType; + using difference_type = ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; +@@ -2110,7 +2110,7 @@ struct HashTableIteratorAdapter { + static_assert(!IsTraceable::value); + + using iterator_category = std::bidirectional_iterator_tag; +- using value_type = HashTableType::ValueType; ++ using value_type = typename HashTableType::ValueType; + using difference_type = ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; +@@ -2158,7 +2158,7 @@ struct HashTableIteratorAdapter< + + public: + using iterator_category = std::bidirectional_iterator_tag; +- using value_type = HashTableType::ValueType; ++ using value_type = typename HashTableType::ValueType; + using difference_type = ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; +Index: chromium-123.0.6312.46/base/types/fixed_array.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/types/fixed_array.h ++++ chromium-123.0.6312.46/base/types/fixed_array.h +@@ -27,8 +27,8 @@ template { + public: + using absl::FixedArray::FixedArray; +- explicit FixedArray(absl::FixedArray::size_type n, +- const absl::FixedArray::allocator_type& a = ++ explicit FixedArray(typename absl::FixedArray::size_type n, ++ const typename absl::FixedArray::allocator_type& a = + typename absl::FixedArray::allocator_type()) + : FixedArray(n, T(), a) {} + }; +Index: chromium-123.0.6312.46/chrome/browser/web_applications/commands/internal/command_internal.h +=================================================================== +--- chromium-123.0.6312.46.orig/chrome/browser/web_applications/commands/internal/command_internal.h ++++ chromium-123.0.6312.46/chrome/browser/web_applications/commands/internal/command_internal.h +@@ -121,7 +121,7 @@ class CommandBase { + template + class CommandWithLock : public CommandBase { + public: +- using LockDescription = LockType::LockDescription; ++ using LockDescription = typename LockType::LockDescription; + explicit CommandWithLock(const std::string& name, + LockDescription initial_lock_request); + +Index: chromium-123.0.6312.46/chrome/browser/web_applications/commands/web_app_command.h +=================================================================== +--- chromium-123.0.6312.46.orig/chrome/browser/web_applications/commands/web_app_command.h ++++ chromium-123.0.6312.46/chrome/browser/web_applications/commands/web_app_command.h +@@ -106,7 +106,7 @@ class WebAppLockManager; + template + class WebAppCommand : public internal::CommandWithLock { + public: +- using LockDescription = LockType::LockDescription; ++ using LockDescription = typename LockType::LockDescription; + using CallbackType = base::OnceCallback; + using ShutdownArgumentsTuple = std::tuple...>; + +Index: chromium-123.0.6312.46/chrome/browser/web_applications/web_app_command_scheduler.h +=================================================================== +--- chromium-123.0.6312.46.orig/chrome/browser/web_applications/web_app_command_scheduler.h ++++ chromium-123.0.6312.46/chrome/browser/web_applications/web_app_command_scheduler.h +@@ -363,7 +363,7 @@ class WebAppCommandScheduler { + // command system. + template + void ScheduleCallback(const std::string& operation_name, +- LockType::LockDescription lock_description, ++ typename LockType::LockDescription lock_description, + CallbackCommand callback, + base::OnceClosure on_complete, + const base::Location& location = FROM_HERE) { +@@ -381,7 +381,7 @@ class WebAppCommandScheduler { + typename CallbackReturnValue = std::decay_t> + void ScheduleCallbackWithResult( + const std::string& operation_name, +- LockType::LockDescription lock_description, ++ typename LockType::LockDescription lock_description, + CallbackCommand callback, + base::OnceCallback on_complete, + CallbackReturnValue arg_for_shutdown, +Index: chromium-123.0.6312.46/components/supervised_user/core/browser/proto_fetcher.h +=================================================================== +--- chromium-123.0.6312.46.orig/components/supervised_user/core/browser/proto_fetcher.h ++++ chromium-123.0.6312.46/components/supervised_user/core/browser/proto_fetcher.h +@@ -424,7 +424,7 @@ class RetryingFetcherImpl final : public + RetryingFetcherImpl(const RetryingFetcherImpl&) = delete; + RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete; + +- void Start(ProtoFetcher::Callback callback) override { ++ void Start(typename ProtoFetcher::Callback callback) override { + callback_ = std::move(callback); + Retry(); + } +@@ -469,7 +469,7 @@ class RetryingFetcherImpl final : public + } + + // Client callback. +- TypedProtoFetcher::Callback callback_; ++ typename TypedProtoFetcher::Callback callback_; + + // Retry controls. + base::OneShotTimer timer_; +@@ -490,7 +490,7 @@ class ParallelFetchManager { + // Deferred fetcher is required because it should be started after it is + // stored internally. + using Fetcher = ProtoFetcher; +- using KeyType = base::IDMap>::KeyType; ++ using KeyType = typename base::IDMap>::KeyType; + + public: + // Provides fresh instances of a deferred fetcher for each fetch. +@@ -506,7 +506,7 @@ class ParallelFetchManager { + + // Starts the fetch. Underlying fetcher is stored internally, and will be + // cleaned up after finish or when this manager is destroyed. +- void Fetch(const Request& request, Fetcher::Callback callback) { ++ void Fetch(const Request& request, typename Fetcher::Callback callback) { + CHECK(callback) << "Use base::DoNothing() instead of empty callback."; + KeyType key = requests_in_flight_.Add(MakeFetcher(request)); + requests_in_flight_.Lookup(key)->Start( diff --git a/chromium-126-quiche-interator.patch b/chromium-126-quiche-interator.patch new file mode 100644 index 0000000..9b630a8 --- /dev/null +++ b/chromium-126-quiche-interator.patch @@ -0,0 +1,12 @@ +diff -up chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h.me chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h +--- chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h.me 2024-06-03 15:01:54.724207324 +0200 ++++ chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h 2024-06-03 14:58:16.244189794 +0200 +@@ -144,7 +144,7 @@ class QUICHE_NO_EXPORT QuicIntervalDeque + // for efficient std::lower_bound() calls. + class QUICHE_NO_EXPORT Iterator { + public: +- using iterator_category = std::random_access_iterator_tag; ++ using iterator_category = std::forward_iterator_tag; + using value_type = T; + using difference_type = std::ptrdiff_t; + using pointer = T*; diff --git a/chromium-127-bindgen.patch b/chromium-127-bindgen.patch new file mode 100644 index 0000000..46708cb --- /dev/null +++ b/chromium-127-bindgen.patch @@ -0,0 +1,108 @@ +author: Andres Salomon +description: fix bindgen-related stuff + +Two separate but related fixes: + +Crabbyav1f is calling bindgen features which are not currently in +bookworm or sid; --allowlist-item was added in bindgen 0.68. As far +as I can tell the build.rs stuff calls allowlist_item from there as +well, so these arguments may just be redundant? Hopefully I'm not +breaking stuff.. Drop this for sid once bindgen gets upgraded. + + +Also, the call to bindgen sets the path for libclang to +rust_bindgen_root, which is wrong. We're already passing +clang_base_path with the path to libclang, there's no reason that +we'd expect libclang to be in the same directory as bindgen. That +fix should probably go upstream. + + +--- a/third_party/crabbyavif/BUILD.gn ++++ b/third_party/crabbyavif/BUILD.gn +@@ -12,15 +12,6 @@ rust_bindgen("crabbyavif_dav1d_bindings" + bindgen_flags = [ + "no-doc-comments", + "generate=functions,types,vars,methods,constructors,destructors", +- "allowlist-item=dav1d_close", +- "allowlist-item=dav1d_data_unref", +- "allowlist-item=dav1d_data_wrap", +- "allowlist-item=dav1d_default_settings", +- "allowlist-item=dav1d_error", +- "allowlist-item=dav1d_get_picture", +- "allowlist-item=dav1d_open", +- "allowlist-item=dav1d_picture_unref", +- "allowlist-item=dav1d_send_data", + ] + } + +@@ -46,59 +37,6 @@ rust_bindgen("crabbyavif_libyuv_bindings + bindgen_flags = [ + "no-doc-comments", + "generate=functions,types,vars,methods,constructors,destructors", +- "allowlist-item=ARGBAttenuate", +- "allowlist-item=ARGBUnattenuate", +- "allowlist-item=Convert16To8Plane", +- "allowlist-item=FilterMode", +- "allowlist-item=FilterMode_kFilterBilinear", +- "allowlist-item=FilterMode_kFilterBox", +- "allowlist-item=FilterMode_kFilterNone", +- "allowlist-item=HalfFloatPlane", +- "allowlist-item=I010AlphaToARGBMatrix", +- "allowlist-item=I010AlphaToARGBMatrixFilter", +- "allowlist-item=I010ToARGBMatrix", +- "allowlist-item=I010ToARGBMatrixFilter", +- "allowlist-item=I012ToARGBMatrix", +- "allowlist-item=I210AlphaToARGBMatrix", +- "allowlist-item=I210AlphaToARGBMatrixFilter", +- "allowlist-item=I210ToARGBMatrix", +- "allowlist-item=I210ToARGBMatrixFilter", +- "allowlist-item=I400ToARGBMatrix", +- "allowlist-item=I410AlphaToARGBMatrix", +- "allowlist-item=I410ToARGBMatrix", +- "allowlist-item=I420AlphaToARGBMatrix", +- "allowlist-item=I420AlphaToARGBMatrixFilter", +- "allowlist-item=I420ToARGBMatrix", +- "allowlist-item=I420ToARGBMatrixFilter", +- "allowlist-item=I420ToRGB24Matrix", +- "allowlist-item=I420ToRGB24MatrixFilter", +- "allowlist-item=I420ToRGB565Matrix", +- "allowlist-item=I420ToRGBAMatrix", +- "allowlist-item=I422AlphaToARGBMatrix", +- "allowlist-item=I422AlphaToARGBMatrixFilter", +- "allowlist-item=I422ToARGBMatrix", +- "allowlist-item=I422ToARGBMatrixFilter", +- "allowlist-item=I422ToRGB24MatrixFilter", +- "allowlist-item=I422ToRGB565Matrix", +- "allowlist-item=I422ToRGBAMatrix", +- "allowlist-item=I444AlphaToARGBMatrix", +- "allowlist-item=I444ToARGBMatrix", +- "allowlist-item=I444ToRGB24Matrix", +- "allowlist-item=ScalePlane", +- "allowlist-item=ScalePlane_12", +- "allowlist-item=YuvConstants", +- "allowlist-item=kYuv2020Constants", +- "allowlist-item=kYuvF709Constants", +- "allowlist-item=kYuvH709Constants", +- "allowlist-item=kYuvI601Constants", +- "allowlist-item=kYuvJPEGConstants", +- "allowlist-item=kYuvV2020Constants", +- "allowlist-item=kYvu2020Constants", +- "allowlist-item=kYvuF709Constants", +- "allowlist-item=kYvuH709Constants", +- "allowlist-item=kYvuI601Constants", +- "allowlist-item=kYvuJPEGConstants", +- "allowlist-item=kYvuV2020Constants", + ] + } + +--- a/build/rust/rust_bindgen.gni ++++ b/build/rust/rust_bindgen.gni +@@ -18,7 +18,7 @@ if (host_os == "win") { + + # On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in + # ../lib. +-_libclang_path = rust_bindgen_root ++_libclang_path = clang_base_path + if (host_os == "win") { + _libclang_path += "/bin" + } else { diff --git a/chromium-127-clang17-traitors.patch b/chromium-127-clang17-traitors.patch new file mode 100644 index 0000000..b8ff763 --- /dev/null +++ b/chromium-127-clang17-traitors.patch @@ -0,0 +1,285 @@ +author: Andres Salomon + +Work around the following: + +In file included from ../../mojo/public/cpp/bindings/lib/native_s:32 +truct_serialization.cc:5: +In file included from ../../mojo/public/cpp/bindings/lib/native_struct_serialization.h:13: +In file included from ../../base/check_op.h:9: +In file included from /usr/bin/../include/c++/v1/string:545: +In file included from /usr/bin/../include/c++/v1/__functional/hash.h:24: +In file included from /usr/bin/../include/c++/v1/__utility/pair.h:16: +In file included from /usr/bin/../include/c++/v1/__fwd/get.h:16: +In file included from /usr/bin/../include/c++/v1/__fwd/subrange.h:20: +In file included from /usr/bin/../include/c++/v1/__iterator/concepts.h:34: +/usr/bin/../include/c++/v1/__memory/pointer_traits.h:118:22: error: implicit instantiation of undefined template 'std::__pointer_traits_element_type' + typedef typename __pointer_traits_element_type::type element_type; + ^ +../../base/types/to_address.h:32:40: note: in instantiation of template class 'std::pointer_traits' requested here + requires requires(const P& p) { std::pointer_traits

::to_address(p); } || + ^ +../../base/types/to_address.h:32:35: note: in instantiation of requirement here +../../mojo/public/cpp/bindings/lib/native_struct_serialization.cc requires requires(const P& p) { std::pointer_traits

::to_address(p); } || + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +../../base/types/to_address.h:32:12: note: while substituting template arguments into constraint expression here + requires requires(const P& p) { std::pointer_traits

::to_address(p); } || + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +../../mojo/public/cpp/bindings/type_converter.h:103:26: note: while checking constraint satisfaction for template 'to_address' required here + { mojo::ConvertTo(base::to_address(obj)) } -> std::same_as; + ^~~~ + + +This turns out to be a clang-16 bug, fixed in clang-18: +https://github.com/llvm/llvm-project/issues/67449 + +This is just the pointer_traits.h header from libc++-18-dev, +with a minor tweak to get things building. + +--- /dev/null ++++ b/__memory/pointer_traits.h +@@ -0,0 +1,245 @@ ++// -*- C++ -*- ++//===----------------------------------------------------------------------===// ++// ++// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. ++// See https://llvm.org/LICENSE.txt for license information. ++// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ++// ++//===----------------------------------------------------------------------===// ++ ++#ifndef _LIBCPP___MEMORY_POINTER_TRAITS_H ++#define _LIBCPP___MEMORY_POINTER_TRAITS_H ++ ++#include <__config> ++#include <__memory/addressof.h> ++#include <__type_traits/conditional.h> ++#include <__type_traits/conjunction.h> ++#include <__type_traits/decay.h> ++#include <__type_traits/is_class.h> ++#include <__type_traits/is_function.h> ++#include <__type_traits/is_void.h> ++#include <__type_traits/void_t.h> ++#include <__utility/declval.h> ++#include ++ ++#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) ++# pragma GCC system_header ++#endif ++ ++_LIBCPP_BEGIN_NAMESPACE_STD ++ ++template ++struct __has_element_type : false_type {}; ++ ++template ++struct __has_element_type<_Tp, __void_t > : true_type {}; ++ ++template ::value> ++struct __pointer_traits_element_type {}; ++ ++template ++struct __pointer_traits_element_type<_Ptr, true> { ++ typedef _LIBCPP_NODEBUG typename _Ptr::element_type type; ++}; ++ ++template