From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 78B5FA04E0; Fri, 29 Nov 2019 18:11:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0E7301BF75; Fri, 29 Nov 2019 18:10:51 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 6341654AE for ; Fri, 29 Nov 2019 18:10:46 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Nov 2019 09:10:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,257,1571727600"; d="scan'208";a="409684870" Received: from silpixa00399838.ir.intel.com (HELO silpixa00399838.ger.corp.intel.com) ([10.237.222.120]) by fmsmga005.fm.intel.com with ESMTP; 29 Nov 2019 09:10:44 -0800 From: Kevin Laatz To: dev@dpdk.org Cc: david.marchand@redhat.com, thomas@monjalon.net, bruce.richardson@intel.com, ray.kinsella@intel.com, Kevin Laatz Date: Fri, 29 Nov 2019 17:10:22 +0000 Message-Id: <20191129171024.56165-6-kevin.laatz@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191129171024.56165-1-kevin.laatz@intel.com> References: <20191023010754.65172-1-kevin.laatz@intel.com> <20191129171024.56165-1-kevin.laatz@intel.com> Subject: [dpdk-dev] [PATCH v2 5/7] build: add lib abi checks to meson X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch adds the ABI compatibility check for the lib 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 Signed-off-by: Bruce Richardson --- v2: - fixed conditional around abi check custom target --- buildtools/meson.build | 4 ++++ lib/meson.build | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/buildtools/meson.build b/buildtools/meson.build index 6ef2c5721..56a1e3dee 100644 --- a/buildtools/meson.build +++ b/buildtools/meson.build @@ -7,6 +7,10 @@ pmdinfo = find_program('gen-pmdinfo-cfile.sh') check_experimental_syms = find_program('check-experimental-syms.sh') +if get_option('abi_compat_checks') + abidiff = find_program('abidiff') +endif + # set up map-to-def script using python, either built-in or external python3 = import('python').find_installation(required: false) if python3.found() diff --git a/lib/meson.build b/lib/meson.build index 6ceb5e756..69ea3a2b0 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -180,6 +180,19 @@ foreach l:libraries include_directories: includes, dependencies: shared_deps) + if not is_windows and get_option('compat_checks') + custom_target(dir_name + '.abi_chk', + command: [abidiff, + meson.source_root() + '/lib/abi/' + + dir_name + '.dump', + '@INPUT@'], + input: shared_lib, + output: dir_name + '.abi_chk', + capture: true, + install: false, + build_by_default: is_experimental == 0) + endif + dpdk_libraries = [shared_lib] + dpdk_libraries dpdk_static_libraries = [static_lib] + dpdk_static_libraries endif # sources.length() > 0 -- 2.17.1