tu: Disable -Wmisleading-indentation when compiling with GCC

Based on the approach in e0eea5ea4e.

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<TuRenderpassDataSource, TuRenderpassTraits>::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 <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41644>
This commit is contained in:
Valentine Burley 2026-05-18 12:38:31 +02:00 committed by Marge Bot
parent dd41fde91d
commit 8cd6e3ac08

View file

@ -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],