mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-10 03:04:05 +02:00
meson: Disable -Wformat-nonliteral for the embedded gnulib
glib enables -Werror=format-nonliteral by default which is triggered by the embedded gnulib (in vasnprintf.c). Disable that warning for gnulib alone. The gnulib code is there to handle user provided format strings, so the warning doesn't add anything anyway. This fixes the build under MinGW. https://bugzilla.gnome.org/show_bug.cgi?id=793729
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
|
# glib enables -Werror=format-nonliteral by default, but the embedded gnulib
|
||||||
|
# needs to handle user provided format strings.
|
||||||
|
extra_gnulib_args = cc.get_supported_arguments(['-Wno-format-nonliteral'])
|
||||||
|
|
||||||
gnulib_lib = static_library('gnulib', 'asnprintf.c', 'printf.c', 'printf-args.c', 'printf-parse.c', 'vasnprintf.c',
|
gnulib_lib = static_library('gnulib', 'asnprintf.c', 'printf.c', 'printf-args.c', 'printf-parse.c', 'vasnprintf.c',
|
||||||
include_directories : [configinc, glibinc],
|
include_directories : [configinc, glibinc],
|
||||||
pic : true,
|
pic : true,
|
||||||
c_args : [ '-DLIBDIR="@0@"'.format(get_option('libdir')), '-DGLIB_COMPILATION', '-DG_LOG_DOMAIN="GLib"' ] + glib_hidden_visibility_args)
|
c_args : [ '-DLIBDIR="@0@"'.format(get_option('libdir')), '-DGLIB_COMPILATION', '-DG_LOG_DOMAIN="GLib"' ] + glib_hidden_visibility_args + extra_gnulib_args)
|
||||||
|
Reference in New Issue
Block a user