From ed3d137ad67d29475564a0da248808432c1e0ba9 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Mon, 20 Jun 2022 16:01:30 +0200 Subject: [PATCH] [meson] Check if compiler accepts -Wno-builtin-declaration-mismatch --- src/meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/meson.build b/src/meson.build index e1deaf2ee..abe6e9424 100644 --- a/src/meson.build +++ b/src/meson.build @@ -41,7 +41,13 @@ srcs += files('vernum.c') incs = include_directories('..', '.') -extra_args = ['-DHAVE_CONFIG_H', '-fno-strict-aliasing', '-Wno-builtin-declaration-mismatch', '-Wno-address'] + extracflags +extra_args = ['-DHAVE_CONFIG_H', '-fno-strict-aliasing', '-Wno-address'] + +if compiler.has_argument('-Wno-builtin-declaration-mismatch') + extra_args += ['-Wno-builtin-declaration-mismatch'] +endif + +extra_args += extracflags elinks = executable( 'elinks', srcs,