diff --git a/chromium-113-workaround_clang_bug-structured_binding.patch b/chromium-113-workaround_clang_bug-structured_binding.patch new file mode 100644 index 00000000..88ba646a --- /dev/null +++ b/chromium-113-workaround_clang_bug-structured_binding.patch @@ -0,0 +1,30 @@ +diff -up chromium-113.0.5672.63/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.me chromium-113.0.5672.63/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc +--- chromium-113.0.5672.63/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.me 2023-05-03 16:30:34.244612573 +0200 ++++ chromium-113.0.5672.63/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc 2023-05-03 16:37:36.732278590 +0200 +@@ -516,8 +516,11 @@ wtf_size_t NGGridLayoutAlgorithm::BuildG + row_auto_repetitions); + + bool has_nested_subgrid = false; +- auto& [grid_items, layout_data, subtree_size] = +- sizing_tree->CreateSizingData(); ++ ++ auto& workaround_clang_bug = sizing_tree->CreateSizingData(); ++ auto& grid_items = workaround_clang_bug.grid_items; ++ auto& layout_data = workaround_clang_bug.layout_data; ++ auto& subtree_size = workaround_clang_bug.subtree_size; + + if (!must_ignore_children) { + // Construct grid items that are not subgridded. +@@ -1540,8 +1543,10 @@ void NGGridLayoutAlgorithm::InitializeTr + NGGridSizingTree* sizing_tree) const { + DCHECK(sizing_tree && current_grid_index < sizing_tree->Size()); + +- auto& [grid_items, layout_data, subtree_size] = +- sizing_tree->At(current_grid_index); ++ auto& workaround_clang_bug = sizing_tree->At(current_grid_index); ++ auto& grid_items = workaround_clang_bug.grid_items; ++ auto& layout_data = workaround_clang_bug.layout_data; ++ auto& subtree_size = workaround_clang_bug.subtree_size + + auto InitAndCacheTrackSizes = [&](GridTrackSizingDirection track_direction) { + InitializeTrackCollection(opt_subgrid_data, track_direction, &layout_data); diff --git a/chromium.spec b/chromium.spec index f9218ec6..4a8a480e 100644 --- a/chromium.spec +++ b/chromium.spec @@ -362,6 +362,8 @@ Patch300: chromium-113-rhel8-force-disable-use_gnome_keyring.patch # workaround for bug in clang 14 with c++20 on rhel9, linker errors std::u16string Patch301: chromium-112-workaround-llvm14-c++20-epel8.patch +# workaround for clang bug, https://github.com/llvm/llvm-project/issues/57826 +Patch302: chromium-113-workaround_clang_bug-structured_binding.patch # Use chromium-latest.py to generate clean tarball from released build tarballs, found here: # http://build.chromium.org/buildbot/official/ @@ -949,9 +951,14 @@ udev. %patch -P300 -p1 -b .disblegnomekeyring %endif -%if %{clang} && 0%{?rhel} == 8 +%if %{clang} +%if 0%{?rhel} == 8 %patch -P301 -p1 -b .clang14_c++20 %endif +%if 0%{?rhel} || 0%{?fedora} < 38 +%patch -P302 -p1 -b .workaround_clang_bug-structured_binding +%endif +%endif # Change shebang in all relevant files in this directory and all subdirectories # See `man find` for how the `-exec command {} +` syntax works