Skip to content

Commit

Permalink
buildtools/chkincs: check headers without experimental API
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
david-marchand committed Oct 18, 2023
1 parent c8875eb commit 5b1515a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion buildtools/chkincs/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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()
Expand Down

0 comments on commit 5b1515a

Please sign in to comment.