]> git.droids-corp.org - dpdk.git/commitdiff
buildtools/chkincs: check SDK headers for C++ compatibility
authorBruce Richardson <bruce.richardson@intel.com>
Tue, 15 Feb 2022 17:30:28 +0000 (17:30 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 22 Feb 2022 13:47:49 +0000 (14:47 +0100)
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@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
buildtools/chkincs/meson.build
lib/meson.build

index 790f7006190111e13f8f1aaab91f82ae52197520..9bb19c9ba3be4139cfc196e46b89a6e47bdbf9ba 100644 (file)
@@ -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
index 8e5acd7819acc3cdaabd7b78903e00a43af0e51b..24adbe44c9a6c740062daefedc3410e203899d07 100644 (file)
@@ -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)