Commit 8e5988eb authored by Dylan Baker's avatar Dylan Baker
Browse files

Revert "meson: merge C and C++ compiler arguments check"

This reverts commit cb2ddcef


This causes clang to error out building C++ code. The plan is to fix the
build to work with clang, but in the mean time we'll just revert this
Signed-off-by: default avatarDylan Baker <>
Acked-by: default avatarEric Engestrom <>
parent 1603ce19
......@@ -764,9 +764,7 @@ if ['linux', 'cygwin'].contains(host_machine.system())
pre_args += '-D_GNU_SOURCE'
# Check for generic C/C++ arguments
cpp = meson.get_compiler('cpp')
cpp_args = []
# Check for generic C arguments
c_args = []
foreach a : ['-Wall', '-Werror=implicit-function-declaration',
'-Werror=missing-prototypes', '-fno-math-errno',
......@@ -774,15 +772,22 @@ foreach a : ['-Wall', '-Werror=implicit-function-declaration',
if cc.has_argument(a)
c_args += a
if cpp.has_argument(a)
cpp_args += a
c_vis_args = []
if cc.has_argument('-fvisibility=hidden')
c_vis_args += '-fvisibility=hidden'
# Check for generic C++ arguments
cpp = meson.get_compiler('cpp')
cpp_args = []
foreach a : ['-Wall', '-fno-math-errno', '-fno-trapping-math',
if cpp.has_argument(a)
cpp_args += a
# For some reason, the test for -Wno-foo always succeeds with gcc, even if the
# option is not supported. Hence, check for -Wfoo instead.
if cpp.has_argument('-Wnon-virtual-dtor')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment