[PATCH 2/3] buildtools/chkincs: check sdk headers for C++ compatibility

Bruce Richardson bruce.richardson at intel.com
Tue Feb 15 18:30:28 CET 2022


With a one-line change to the lib meson.build file we can add the sdk
headers to the list of files to be checked using the chkincs binary.
Unfortunately, many of those sdk header depend upon headers in the PCI
and vdev bus drivers, so we need to update chkincs build to ensure those
dependencies are added. We also need to allow internal APIs to be
present in these SDK headers.

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 buildtools/chkincs/meson.build | 6 +++++-
 lib/meson.build                | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build
index 790f700619..9442235200 100644
--- a/buildtools/chkincs/meson.build
+++ b/buildtools/chkincs/meson.build
@@ -13,11 +13,15 @@ gen_c_files = generator(gen_c_file_for_header,

 cflags = machine_args
 cflags += '-DALLOW_EXPERIMENTAL_API'
+cflags += '-DALLOW_INTERNAL_API'

 sources = files('main.c')
 sources += gen_c_files.process(dpdk_chkinc_headers)

-deps = []
+# some driver sdk headers depend on these two buses, which are mandatory in build
+# so we always include them in deps list
+deps = [get_variable('shared_rte_bus_vdev'), get_variable('shared_rte_bus_pci')]
+# add the rest of the libs to the dependencies
 foreach l:enabled_libs
     deps += get_variable('shared_rte_' + l)
 endforeach
diff --git a/lib/meson.build b/lib/meson.build
index 8e5acd7819..24adbe44c9 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -171,6 +171,7 @@ foreach l:libraries
         install_headers(driver_sdk_headers)
     endif
     dpdk_chkinc_headers += headers
+    dpdk_chkinc_headers += driver_sdk_headers

     libname = 'rte_' + name
     includes += include_directories(l)
--
2.32.0



More information about the dev mailing list