[v3,6/7] build: add drivers abi checks to meson
diff mbox series

Message ID 20191129210905.1865-7-kevin.laatz@intel.com
State New
Delegated to: David Marchand
Headers show
Series
  • Add ABI compatibility checks to the meson build
Related show

Checks

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

Commit Message

Laatz, Kevin Nov. 29, 2019, 9:09 p.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>

---
v2:
  - fixed conditional around abi check custom target
---
 drivers/meson.build | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Patch
diff mbox series

diff --git a/drivers/meson.build b/drivers/meson.build
index 72eec4608..e19eed419 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -196,6 +196,19 @@  foreach class:dpdk_driver_classes
 					include_directories: includes,
 					dependencies: static_deps)
 
+			if not is_windows and get_option('compat_checks')
+				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: is_experimental == 0)
+			endif
+
 			dpdk_drivers += static_lib
 
 			set_variable('shared_@0@'.format(lib_name), shared_dep)