meson: add -Dfanalyzer=false|true

When enabled, compile with -fanalyzer
This commit is contained in:
Daniel Eklöf 2026-05-11 13:01:13 +02:00
parent 6183d1b767
commit 98c84e6326
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 6 additions and 1 deletions

View file

@ -96,7 +96,10 @@ add_project_arguments(
cc.get_supported_arguments(
['-pedantic',
'-fstrict-aliasing',
'-Wstrict-aliasing']),
'-Wstrict-aliasing']) +
(get_option('fanalyzer')
? ['-fanalyzer']
: []),
language: 'c',
)