build: Don't append multiple flags as a string

The gtk_debug_cflags variable is an array, with each argument stored in
a separate string; if we add multiple arguments inside the same string
we break the escaping rules.

Fixes: #3864
This commit is contained in:
Emmanuele Bassi 2021-04-12 11:29:24 +01:00 committed by Matthias Clasen
parent 31e08d4629
commit a871a1bdb5

View File

@ -66,7 +66,7 @@ if debug
gtk_debug_cflags += '-DG_ENABLE_CONSISTENCY_CHECKS'
endif
elif optimization in ['2', '3', 's']
gtk_debug_cflags += '-DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT'
gtk_debug_cflags += ['-DG_DISABLE_CAST_CHECKS', '-DG_DISABLE_ASSERT']
endif
add_project_arguments(gtk_debug_cflags, language: 'c')