mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-11 05:33:55 -04:00
meson: clang: add -Wno-wc2y-extensions
Recent clang versions warn on __COUNTER__, unless compiling with -std=c2y (which breaks other things). "Fixes" '__COUNTER__' is a C2y extension (__COUNTER__ is used by our UNITTEST macro).
This commit is contained in:
parent
f49fdf7ca3
commit
4fd682b4e8
1 changed files with 5 additions and 0 deletions
|
|
@ -12,6 +12,11 @@ is_debug_build = get_option('buildtype').startswith('debug')
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
|
|
||||||
|
# Newer clang versions warns when using __COUNTER__ without -std=c2y
|
||||||
|
if cc.has_argument('-Wc2y-extensions')
|
||||||
|
add_project_arguments('-Wno-c2y-extensions', language: 'c')
|
||||||
|
endif
|
||||||
|
|
||||||
if cc.has_function('memfd_create',
|
if cc.has_function('memfd_create',
|
||||||
args: ['-D_GNU_SOURCE'],
|
args: ['-D_GNU_SOURCE'],
|
||||||
prefix: '#include <sys/mman.h>')
|
prefix: '#include <sys/mman.h>')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue