DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, bruce.richardson@intel.com, ktraynor@redhat.com
Subject: [PATCH 3/3] buildtools/chkincs: check headers with stable API only
Date: Tue, 15 Oct 2024 14:10:45 +0200	[thread overview]
Message-ID: <20241015121046.2556695-4-david.marchand@redhat.com> (raw)
In-Reply-To: <20241015121046.2556695-1-david.marchand@redhat.com>

An exported header should be usable w/ and w/o ALLOW_EXPERIMENTAL_API so
that an application that only wants stable API may include it.

Plus, the widely common case is that an application will not use
internal API.

Cover those cases but keep the original test.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 buildtools/chkincs/meson.build | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build
index 8da221fc33..787d70272b 100644
--- a/buildtools/chkincs/meson.build
+++ b/buildtools/chkincs/meson.build
@@ -12,8 +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')
 sources += gen_c_files.process(dpdk_chkinc_headers)
@@ -32,6 +30,18 @@ executable('chkincs', sources,
         dependencies: deps,
         install: false)
 
+executable('chkincs-exp', sources,
+        c_args: [cflags, '-DALLOW_EXPERIMENTAL_API'],
+        include_directories: includes,
+        dependencies: deps,
+        install: false)
+
+executable('chkincs-all', sources,
+        c_args: [cflags, '-DALLOW_EXPERIMENTAL_API', '-DALLOW_INTERNAL_API'],
+        include_directories: includes,
+        dependencies: deps,
+        install: false)
+
 # run tests for c++ builds also
 if not add_languages('cpp', required: false)
     subdir_done()
@@ -49,3 +59,16 @@ executable('chkincs-cpp', cpp_sources,
         include_directories: includes,
         dependencies: deps,
         install: false)
+
+executable('chkincs-cpp-exp', cpp_sources,
+        cpp_args: ['-include', 'rte_config.h', cflags, '-DALLOW_EXPERIMENTAL_API'],
+        include_directories: includes,
+        dependencies: deps,
+        install: false)
+
+executable('chkincs-cpp-all', cpp_sources,
+        cpp_args: ['-include', 'rte_config.h', cflags, '-DALLOW_EXPERIMENTAL_API',
+                   '-DALLOW_INTERNAL_API'],
+        include_directories: includes,
+        dependencies: deps,
+        install: false)
-- 
2.46.2


  parent reply	other threads:[~2024-10-15 12:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-15 12:10 [PATCH 0/3] Enhance headers check David Marchand
2024-10-15 12:10 ` [PATCH 1/3] bitops: fix build for GCC without experimental API David Marchand
2024-10-15 12:47   ` Morten Brørup
2024-10-15 12:10 ` [PATCH 2/3] bitset: " David Marchand
2024-10-15 12:53   ` Morten Brørup
2024-10-15 14:13     ` Thomas Monjalon
2024-10-15 14:44       ` Morten Brørup
2024-10-15 19:58         ` Thomas Monjalon
2024-10-15 20:30           ` Morten Brørup
2024-10-15 12:10 ` David Marchand [this message]
2024-10-16 11:38 ` [PATCH v2 0/4] Enhance headers check David Marchand
2024-10-16 11:38   ` [PATCH v2 1/4] bitops: fix build for GCC without experimental API David Marchand
2024-10-16 11:38   ` [PATCH v2 2/4] bitset: " David Marchand
2024-10-16 14:14     ` Mattias Rönnblom
2024-10-16 15:36       ` David Marchand
2024-10-16 15:42         ` Morten Brørup
2024-10-16 16:03           ` Mattias Rönnblom
2024-10-16 16:17             ` Thomas Monjalon
2024-10-16 15:51         ` Mattias Rönnblom
2024-10-16 11:38   ` [PATCH v2 3/4] vhost: remove internal vDPA API description from public header David Marchand
2024-10-16 11:47     ` Maxime Coquelin
2024-10-16 11:38   ` [PATCH v2 4/4] buildtools/chkincs: check headers with stable API only David Marchand
2024-10-16 20:40   ` [PATCH v2 0/4] Enhance headers check David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241015121046.2556695-4-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ktraynor@redhat.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).