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 26CB65920 for ; Tue, 2 Apr 2019 05:55:03 +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:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,298,1549958400"; d="scan'208";a="287910279" Received: from anandraw-devbx.amr.corp.intel.com ([10.19.242.57]) by orsmga004.jf.intel.com with ESMTP; 01 Apr 2019 20:55:01 -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:58 -0700 Message-Id: <20190402035458.14664-11-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 10/10] build: meson changes to build on 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:04 -0000 Added meson workarounds to build helloworld on Windows. Windows currently only supports kvargs and eal libraries. This change restricts the build flow to supported libraries only. Signed-off-by: Anand Rawat Signed-off-by: Pallavi Kadam Reviewed-by: Jeff Shaw Reviewed-by: Ranjit Menon --- app/meson.build | 6 +++++- buildtools/meson.build | 6 +++++- drivers/meson.build | 6 +++++- examples/meson.build | 6 ++++-- lib/librte_eal/windows/eal/meson.build | 6 ++++++ lib/meson.build | 4 ++++ 6 files changed, 29 insertions(+), 5 deletions(-) diff --git a/app/meson.build b/app/meson.build index aa353f657..e949624b7 100644 --- a/app/meson.build +++ b/app/meson.build @@ -1,5 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation + +if host_machine.system() == 'windows' + subdir_done() +endif apps = [ 'pdump', diff --git a/buildtools/meson.build b/buildtools/meson.build index cdd38ed24..0209bec8f 100644 --- a/buildtools/meson.build +++ b/buildtools/meson.build @@ -1,5 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation + +if host_machine.system() == 'windows' + subdir_done() +endif subdir('pmdinfogen') diff --git a/drivers/meson.build b/drivers/meson.build index 8c76a5659..7520a16e3 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -1,5 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation + +if host_machine.system() == 'windows' + subdir_done() +endif # Defines the order in which the drivers are buit. dpdk_driver_classes = ['common', diff --git a/examples/meson.build b/examples/meson.build index af81c762e..3bf1c2db8 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation driver_libs = [] if get_option('default_library') == 'static' @@ -35,7 +35,9 @@ foreach example: examples ext_deps = [execinfo] includes = [include_directories(example)] - deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline'] + if host_machine.system() == 'windows' + deps = ['eal'] # only supported lib on Windows currently + endif subdir(example) if build diff --git a/lib/librte_eal/windows/eal/meson.build b/lib/librte_eal/windows/eal/meson.build index 6bc577e5c..e9b7138c5 100644 --- a/lib/librte_eal/windows/eal/meson.build +++ b/lib/librte_eal/windows/eal/meson.build @@ -5,6 +5,12 @@ eal_inc += include_directories('include') env_objs = [] env_headers = [] +common_sources = files( + '../../common/eal_common_errno.c', + '../../common/eal_common_launch.c', + '../../common/eal_common_lcore.c', + '../../common/eal_common_log.c' +) env_sources = files('eal.c', 'eal_debug.c', 'eal_lcore.c', diff --git a/lib/meson.build b/lib/meson.build index a7b5a9194..c3289f885 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -30,6 +30,10 @@ libraries = [ # flow_classify lib depends on pkt framework table lib 'flow_classify', 'bpf', 'telemetry'] +if host_machine.system() == 'windows' + libraries = ['kvargs','eal'] # only supported libraries for windows +endif + default_cflags = machine_args if cc.has_argument('-Wno-format-truncation') default_cflags += '-Wno-format-truncation' -- 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 3BB0AA0679 for ; Tue, 2 Apr 2019 05:56:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E791A7CEB; Tue, 2 Apr 2019 05:55:21 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 26CB65920 for ; Tue, 2 Apr 2019 05:55:03 +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:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,298,1549958400"; d="scan'208";a="287910279" Received: from anandraw-devbx.amr.corp.intel.com ([10.19.242.57]) by orsmga004.jf.intel.com with ESMTP; 01 Apr 2019 20:55:01 -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:58 -0700 Message-Id: <20190402035458.14664-11-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 10/10] build: meson changes to build on 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: <20190402035458.FlAz9qWXhUZU45WtYlM8NHPMXBZOsD4QhsdoHQ8N4s8@z> Added meson workarounds to build helloworld on Windows. Windows currently only supports kvargs and eal libraries. This change restricts the build flow to supported libraries only. Signed-off-by: Anand Rawat Signed-off-by: Pallavi Kadam Reviewed-by: Jeff Shaw Reviewed-by: Ranjit Menon --- app/meson.build | 6 +++++- buildtools/meson.build | 6 +++++- drivers/meson.build | 6 +++++- examples/meson.build | 6 ++++-- lib/librte_eal/windows/eal/meson.build | 6 ++++++ lib/meson.build | 4 ++++ 6 files changed, 29 insertions(+), 5 deletions(-) diff --git a/app/meson.build b/app/meson.build index aa353f657..e949624b7 100644 --- a/app/meson.build +++ b/app/meson.build @@ -1,5 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation + +if host_machine.system() == 'windows' + subdir_done() +endif apps = [ 'pdump', diff --git a/buildtools/meson.build b/buildtools/meson.build index cdd38ed24..0209bec8f 100644 --- a/buildtools/meson.build +++ b/buildtools/meson.build @@ -1,5 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation + +if host_machine.system() == 'windows' + subdir_done() +endif subdir('pmdinfogen') diff --git a/drivers/meson.build b/drivers/meson.build index 8c76a5659..7520a16e3 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -1,5 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation + +if host_machine.system() == 'windows' + subdir_done() +endif # Defines the order in which the drivers are buit. dpdk_driver_classes = ['common', diff --git a/examples/meson.build b/examples/meson.build index af81c762e..3bf1c2db8 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation driver_libs = [] if get_option('default_library') == 'static' @@ -35,7 +35,9 @@ foreach example: examples ext_deps = [execinfo] includes = [include_directories(example)] - deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline'] + if host_machine.system() == 'windows' + deps = ['eal'] # only supported lib on Windows currently + endif subdir(example) if build diff --git a/lib/librte_eal/windows/eal/meson.build b/lib/librte_eal/windows/eal/meson.build index 6bc577e5c..e9b7138c5 100644 --- a/lib/librte_eal/windows/eal/meson.build +++ b/lib/librte_eal/windows/eal/meson.build @@ -5,6 +5,12 @@ eal_inc += include_directories('include') env_objs = [] env_headers = [] +common_sources = files( + '../../common/eal_common_errno.c', + '../../common/eal_common_launch.c', + '../../common/eal_common_lcore.c', + '../../common/eal_common_log.c' +) env_sources = files('eal.c', 'eal_debug.c', 'eal_lcore.c', diff --git a/lib/meson.build b/lib/meson.build index a7b5a9194..c3289f885 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -30,6 +30,10 @@ libraries = [ # flow_classify lib depends on pkt framework table lib 'flow_classify', 'bpf', 'telemetry'] +if host_machine.system() == 'windows' + libraries = ['kvargs','eal'] # only supported libraries for windows +endif + default_cflags = machine_args if cc.has_argument('-Wno-format-truncation') default_cflags += '-Wno-format-truncation' -- 2.17.1.windows.2