From 5b1515a9e83dba4a9a2a1dd0bc9a1ba44f0c5954 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Wed, 18 Oct 2023 10:03:43 +0200 Subject: [PATCH] buildtools/chkincs: check headers without experimental API Checking headers with ALLOW_EXPERIMENTAL_API is not strict enough. Split the check in two so we make sure headers can be called with and without experimental symbols. Signed-off-by: David Marchand --- buildtools/chkincs/meson.build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build index f2dadcae18..04187fa872 100644 --- a/buildtools/chkincs/meson.build +++ b/buildtools/chkincs/meson.build @@ -12,7 +12,6 @@ gen_c_files = generator(gen_c_file_for_header, arguments: ['@INPUT@', '@OUTPUT@']) cflags = machine_args -cflags += '-DALLOW_EXPERIMENTAL_API' cflags += '-DALLOW_INTERNAL_API' sources = files('main.c') @@ -32,6 +31,14 @@ executable('chkincs', sources, dependencies: deps, install: false) +cflags += '-DALLOW_EXPERIMENTAL_API' + +executable('chkincs-exp', sources, + c_args: cflags, + include_directories: includes, + dependencies: deps, + install: false) + # run tests for c++ builds also if not add_languages('cpp', required: false) subdir_done()