From 2f2a523818bf64e23657d1bf9da901d7f58c67aa Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Wed, 20 May 2026 19:36:12 -0700 Subject: [PATCH] Fix gcc 16 build. TEST=local build Bug: https://github.com/dart-lang/sdk/issues/63406 Change-Id: I20c2806e569211ef7d32e95961179dbf2aba15a9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505181 Reviewed-by: Alexander Markov Commit-Queue: Ryan Macnak --- build/config/compiler/BUILD.gn | 1 + runtime/vm/object_graph_copy.cc | 1 + third_party/binaryen/BUILD.gn | 1 + 3 files changed, 3 insertions(+) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 6181c1da424..18603ade947 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -687,6 +687,7 @@ if (is_win) { } else { default_warning_flags += [ "-Wno-ignored-qualifiers", # Warnings in BoringSSL headers + "-Wno-stringop-overflow", # ICU in gcc 16 ] if (is_tsan && current_cpu == "riscv64") { default_warning_flags += [ diff --git a/runtime/vm/object_graph_copy.cc b/runtime/vm/object_graph_copy.cc index 5e16127e42f..4a35a5d4a5c 100644 --- a/runtime/vm/object_graph_copy.cc +++ b/runtime/vm/object_graph_copy.cc @@ -1249,6 +1249,7 @@ class RetainingPath { // accommodate short chains Closure -> Context -> instance. saved_context_object_index = -1; saved_context_depth = -1; + USE(saved_context_depth); } // Add library url to the location if library is available. library = klass.library(); diff --git a/third_party/binaryen/BUILD.gn b/third_party/binaryen/BUILD.gn index bd2cabb7475..d06aecdc5dc 100644 --- a/third_party/binaryen/BUILD.gn +++ b/third_party/binaryen/BUILD.gn @@ -28,6 +28,7 @@ config("binaryen_flags") { } else { # GCC cflags += [ + "-Wno-array-bounds", "-Wno-dangling-pointer", "-Wno-deprecated", "-Wno-init-list-lifetime",