From 8cd6e3ac08b4f5f56f161c6f6fb8cff1b95ae46c Mon Sep 17 00:00:00 2001 From: Valentine Burley Date: Mon, 18 May 2026 12:38:31 +0200 Subject: [PATCH] tu: Disable -Wmisleading-indentation when compiling with GCC Based on the approach in e0eea5ea4ed. When a file is too large, -Wmisleading-indentantion will give the warning below, that we can't prevent from a #pragma: ../src/freedreno/vulkan/tu_perfetto.cc: In function 'void setup_incremental_state(MesaRenderpassDataSource::TraceContext&, tu_device*)': ../src/freedreno/vulkan/tu_perfetto.cc:162: note: '-Wmisleading-indentation' is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers 162 | if (!state->was_cleared) ../src/freedreno/vulkan/tu_perfetto.cc:162: note: adding '-flarge-source-files' will allow for more column-tracking support, at the expense of compilation time and memory See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549 for details. Signed-off-by: Valentine Burley Part-of: --- src/freedreno/vulkan/meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/freedreno/vulkan/meson.build b/src/freedreno/vulkan/meson.build index d8c17e6df8d..b1f94d293f1 100644 --- a/src/freedreno/vulkan/meson.build +++ b/src/freedreno/vulkan/meson.build @@ -178,6 +178,10 @@ tu_cpp_args += cpp.get_supported_arguments([ '-Wno-write-strings', ]) +if cpp.get_id() == 'gcc' + tu_cpp_args += cpp.get_supported_arguments(['-Wno-misleading-indentation']) +endif + libvulkan_freedreno = shared_library( 'vulkan_freedreno', [libtu_files, tu_entrypoints, tu_tracepoints, freedreno_xml_header_files, sha1_h, u_format_pack_h, bvh_spv],