From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D7D8F5699 for ; Tue, 2 Apr 2019 05:55:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Apr 2019 20:55:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,298,1549958400"; d="scan'208";a="287910261" Received: from anandraw-devbx.amr.corp.intel.com ([10.19.242.57]) by orsmga004.jf.intel.com with ESMTP; 01 Apr 2019 20:55:00 -0700 From: Anand Rawat To: dev@dpdk.org Cc: anand.rawat@intel.com, pallavi.kadam@intel.com, ranjit.menon@intel.com, jeffrey.b.shaw@intel.com, bruce.richardson@intel.com, thomas@monjalon.net Date: Mon, 1 Apr 2019 20:54:53 -0700 Message-Id: <20190402035458.14664-6-anand.rawat@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20190402035458.14664-1-anand.rawat@intel.com> References: <20190306041634.12976-1-anand.rawat@intel.com> <20190402035458.14664-1-anand.rawat@intel.com> Subject: [dpdk-dev] [PATCH v8 05/10] build: add module definition file for windows 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: , X-List-Received-Date: Tue, 02 Apr 2019 03:55:03 -0000 Updated lib/meson.build to create shared libraries on Windows. Added DEF files to list the exports for the eal and kvargs libraries. Signed-off-by: Bruce Richardson Signed-off-by: Anand Rawat Reviewed-by: Pallavi Kadam Reviewed-by: Ranjit Menon --- lib/librte_eal/rte_eal_exports.def | 9 +++++++++ lib/librte_kvargs/rte_kvargs_exports.def | 7 +++++++ lib/meson.build | 15 ++++++++++++--- 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 lib/librte_eal/rte_eal_exports.def create mode 100644 lib/librte_kvargs/rte_kvargs_exports.def diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def new file mode 100644 index 000000000..12a6c79d6 --- /dev/null +++ b/lib/librte_eal/rte_eal_exports.def @@ -0,0 +1,9 @@ +EXPORTS + __rte_panic + rte_eal_get_configuration + rte_eal_init + rte_eal_mp_remote_launch + rte_eal_mp_wait_lcore + rte_eal_remote_launch + rte_log + rte_vlog diff --git a/lib/librte_kvargs/rte_kvargs_exports.def b/lib/librte_kvargs/rte_kvargs_exports.def new file mode 100644 index 000000000..10e839e00 --- /dev/null +++ b/lib/librte_kvargs/rte_kvargs_exports.def @@ -0,0 +1,7 @@ +EXPORTS + rte_kvargs_count + rte_kvargs_free + rte_kvargs_parse + rte_kvargs_process + rte_kvargs_parse_delim + rte_kvargs_strcmp diff --git a/lib/meson.build b/lib/meson.build index 99957ba7d..a7b5a9194 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation # process all libraries equally, as far as possible @@ -117,14 +117,23 @@ foreach l:libraries objs += static_lib.extract_all_objects(recursive: false) version_map = '@0@/@1@/rte_@2@_version.map'.format( meson.current_source_dir(), dir_name, name) + exports = [] + implib = dir_name + '.dll.a' + if host_machine.system() == 'windows' + exports = '@0@/@1@/rte_@2@_exports.def'.format( + meson.current_source_dir(), dir_name, name) + lk_args = ['-Wl,/def:' + exports, '-Wl,/implib:lib\\' + implib] + else + lk_args = ['-Wl,--version-script=' + version_map] + endif shared_lib = shared_library(libname, sources, objects: objs, c_args: cflags, dependencies: shared_deps, include_directories: includes, - link_args: '-Wl,--version-script=' + version_map, - link_depends: version_map, + link_args: lk_args, + link_depends: [version_map, exports], version: lib_version, soversion: so_version, install: true) -- 2.17.1.windows.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id F40B5A0679 for ; Tue, 2 Apr 2019 05:55:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C23625F17; Tue, 2 Apr 2019 05:55:13 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D7D8F5699 for ; Tue, 2 Apr 2019 05:55:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Apr 2019 20:55:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,298,1549958400"; d="scan'208";a="287910261" Received: from anandraw-devbx.amr.corp.intel.com ([10.19.242.57]) by orsmga004.jf.intel.com with ESMTP; 01 Apr 2019 20:55:00 -0700 From: Anand Rawat To: dev@dpdk.org Cc: anand.rawat@intel.com, pallavi.kadam@intel.com, ranjit.menon@intel.com, jeffrey.b.shaw@intel.com, bruce.richardson@intel.com, thomas@monjalon.net Date: Mon, 1 Apr 2019 20:54:53 -0700 Message-Id: <20190402035458.14664-6-anand.rawat@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20190402035458.14664-1-anand.rawat@intel.com> References: <20190306041634.12976-1-anand.rawat@intel.com> <20190402035458.14664-1-anand.rawat@intel.com> Subject: [dpdk-dev] [PATCH v8 05/10] build: add module definition file for windows 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" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190402035453.U3jMfuV1nbXe6wlAMuz9-uYOMEu-UMUjh5GIV5uU0tc@z> Updated lib/meson.build to create shared libraries on Windows. Added DEF files to list the exports for the eal and kvargs libraries. Signed-off-by: Bruce Richardson Signed-off-by: Anand Rawat Reviewed-by: Pallavi Kadam Reviewed-by: Ranjit Menon --- lib/librte_eal/rte_eal_exports.def | 9 +++++++++ lib/librte_kvargs/rte_kvargs_exports.def | 7 +++++++ lib/meson.build | 15 ++++++++++++--- 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 lib/librte_eal/rte_eal_exports.def create mode 100644 lib/librte_kvargs/rte_kvargs_exports.def diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def new file mode 100644 index 000000000..12a6c79d6 --- /dev/null +++ b/lib/librte_eal/rte_eal_exports.def @@ -0,0 +1,9 @@ +EXPORTS + __rte_panic + rte_eal_get_configuration + rte_eal_init + rte_eal_mp_remote_launch + rte_eal_mp_wait_lcore + rte_eal_remote_launch + rte_log + rte_vlog diff --git a/lib/librte_kvargs/rte_kvargs_exports.def b/lib/librte_kvargs/rte_kvargs_exports.def new file mode 100644 index 000000000..10e839e00 --- /dev/null +++ b/lib/librte_kvargs/rte_kvargs_exports.def @@ -0,0 +1,7 @@ +EXPORTS + rte_kvargs_count + rte_kvargs_free + rte_kvargs_parse + rte_kvargs_process + rte_kvargs_parse_delim + rte_kvargs_strcmp diff --git a/lib/meson.build b/lib/meson.build index 99957ba7d..a7b5a9194 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation # process all libraries equally, as far as possible @@ -117,14 +117,23 @@ foreach l:libraries objs += static_lib.extract_all_objects(recursive: false) version_map = '@0@/@1@/rte_@2@_version.map'.format( meson.current_source_dir(), dir_name, name) + exports = [] + implib = dir_name + '.dll.a' + if host_machine.system() == 'windows' + exports = '@0@/@1@/rte_@2@_exports.def'.format( + meson.current_source_dir(), dir_name, name) + lk_args = ['-Wl,/def:' + exports, '-Wl,/implib:lib\\' + implib] + else + lk_args = ['-Wl,--version-script=' + version_map] + endif shared_lib = shared_library(libname, sources, objects: objs, c_args: cflags, dependencies: shared_deps, include_directories: includes, - link_args: '-Wl,--version-script=' + version_map, - link_depends: version_map, + link_args: lk_args, + link_depends: [version_map, exports], version: lib_version, soversion: so_version, install: true) -- 2.17.1.windows.2