[RFC,6/6] build: add drivers abi checks to meson

Message ID 20191023010754.65172-7-kevin.laatz@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Add ABI compatibility checks to the meson build |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Kevin Laatz Oct. 23, 2019, 1:07 a.m. UTC
  This patch adds the ABI compatibility check for the drivers directory to
the meson build. If enabled, the ABI compatibility checks will run for all
.so's in the lib directory (provided a matching dump file exists). The
build will fail if an ABI incompatibility is detected.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 drivers/meson.build | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/meson.build b/drivers/meson.build
index 3202ba00d..0fda5a9e0 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -158,7 +158,9 @@  foreach class:dpdk_driver_classes
 						version_map, '@INPUT@'],
 					capture: true,
 					input: static_lib,
-					output: lib_name + '.exp_chk')
+					output: lib_name + '.exp_chk'
+					install: false,
+					build_by_default: get_option('abi_compat_checks'))
 			endif
 
 			shared_lib = shared_library(lib_name,
@@ -183,6 +185,19 @@  foreach class:dpdk_driver_classes
 					include_directories: includes,
 					dependencies: static_objs)
 
+			if is_experimental == 0
+				custom_target('lib' + lib_name + '.abi_chk',
+					command: [abidiff,
+						meson.source_root() + '/drivers/abi/lib'
+						+ lib_name + '.dump',
+						'@INPUT@'],
+					input: shared_lib,
+					output: 'lib' + lib_name + '.abi_chk',
+					capture: true,
+					install: false,
+					build_by_default: get_option('abi_compat_checks'))
+			endif
+
 			dpdk_drivers += static_lib
 
 			set_variable('shared_@0@'.format(lib_name), shared_dep)