diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2026-03-10 06:59:40 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2026-03-10 07:21:49 +0000 |
| commit | 4fd682b4e8d985ce25d2bd599c1d855bc1489650 (patch) | |
| tree | 80f742a1c93e9d485415e2ddae326575bbc5968f | |
| parent | themes: paper-color-light: fix newline (diff) | |
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).
| -rw-r--r-- | meson.build | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 66b3d6bc..16e8e3c0 100644 --- a/meson.build +++ b/meson.build @@ -12,6 +12,11 @@ is_debug_build = get_option('buildtype').startswith('debug') 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', args: ['-D_GNU_SOURCE'], prefix: '#include <sys/mman.h>') |
