nir: Disable -Wmisleading-indentation when compiling with GCC
When a file is too large, -Wmisleading-indentantion will give the warning
below, that we can't prevent from a #pragma:
```
src/compiler/nir/nir_opt_algebraic.c: In function ‘nir_opt_algebraic’:
src/compiler/nir/nir_opt_algebraic.c:1469069: note: ‘-Wmisleading-indentation’ is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers
1469069 | nir_foreach_function_impl(impl, shader) {
|
src/compiler/nir/nir_opt_algebraic.c:1469069: 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.
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25315>
This commit is contained in:
parent
ef88a20d96
commit
e0eea5ea4e
1 changed files with 11 additions and 1 deletions
|
|
@ -306,13 +306,23 @@ files_libnir = files(
|
|||
'nir_xfb_info.h',
|
||||
)
|
||||
|
||||
# When a file is too large, -Wmisleading-indentation will give a note about
|
||||
# not being able to process it, however that is not suppressable by a #pragma
|
||||
# in GCC. This happens with the generated code in nir_opt_algebraic.c.
|
||||
#
|
||||
# As a workaround, drop the warning for GCC. Clang builds should cover this.
|
||||
no_misleading_indentation = []
|
||||
if cc.get_id() == 'gcc'
|
||||
no_misleading_indentation += cc.get_supported_arguments('-Wno-misleading-indentation')
|
||||
endif
|
||||
|
||||
_libnir = static_library(
|
||||
'nir',
|
||||
[files_libnir, nir_opt_algebraic_c, nir_opcodes_c,
|
||||
nir_opcodes_h, nir_constant_expressions_c, nir_builder_opcodes_h,
|
||||
nir_intrinsics_c, nir_intrinsics_h, nir_intrinsics_indices_h],
|
||||
include_directories : [inc_include, inc_src],
|
||||
c_args : [c_msvc_compat_args, no_override_init_args],
|
||||
c_args : [c_msvc_compat_args, no_override_init_args, no_misleading_indentation],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [idep_compiler, dep_valgrind],
|
||||
build_by_default : false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue