From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 316112956 for ; Wed, 20 Mar 2019 01:40:55 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2019 17:40:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,246,1549958400"; d="scan'208";a="135513438" Received: from anandraw-devbx.amr.corp.intel.com ([10.19.242.57]) by orsmga003.jf.intel.com with ESMTP; 19 Mar 2019 17:40:52 -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: Tue, 19 Mar 2019 17:40:50 -0700 Message-Id: <20190320004050.13184-9-anand.rawat@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20190320004050.13184-1-anand.rawat@intel.com> References: <20190306041634.12976-1-anand.rawat@intel.com> <20190320004050.13184-1-anand.rawat@intel.com> Subject: [dpdk-dev] [PATCH v3 8/8] 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: Wed, 20 Mar 2019 00:40:55 -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 --- examples/meson.build | 6 +- lib/librte_eal/common/meson.build | 159 ++++++++++++++++-------------- lib/meson.build | 4 + meson.build | 33 ++++--- 4 files changed, 113 insertions(+), 89 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index af81c762e..107e378e7 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -35,7 +35,11 @@ foreach example: examples ext_deps = [execinfo] includes = [include_directories(example)] - deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline'] + if host_machine.system() != 'windows' + deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline'] + else + deps = ['eal'] + endif subdir(example) if build diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build index 5ecae0b1f..05ebd06b6 100644 --- a/lib/librte_eal/common/meson.build +++ b/lib/librte_eal/common/meson.build @@ -1,91 +1,102 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation eal_inc += include_directories('.', 'include', join_paths('include/arch', arch_subdir)) common_objs = [] +common_headers = [] + common_sources = files( - 'eal_common_bus.c', - 'eal_common_cpuflags.c', - 'eal_common_class.c', - 'eal_common_devargs.c', - 'eal_common_dev.c', - 'eal_common_errno.c', - 'eal_common_fbarray.c', - 'eal_common_hexdump.c', - 'eal_common_hypervisor.c', - 'eal_common_launch.c', - 'eal_common_lcore.c', - 'eal_common_log.c', - 'eal_common_memalloc.c', - 'eal_common_memory.c', - 'eal_common_memzone.c', - 'eal_common_options.c', - 'eal_common_proc.c', - 'eal_common_string_fns.c', - 'eal_common_tailqs.c', - 'eal_common_thread.c', - 'eal_common_timer.c', - 'eal_common_uuid.c', - 'hotplug_mp.c', - 'malloc_elem.c', - 'malloc_heap.c', - 'malloc_mp.c', - 'rte_keepalive.c', - 'rte_malloc.c', - 'rte_option.c', - 'rte_reciprocal.c', - 'rte_service.c' -) + 'eal_common_errno.c', + 'eal_common_launch.c', + 'eal_common_lcore.c', + 'eal_common_log.c' + ) +if host_machine.system() != 'windows' + common_sources = files( + 'eal_common_bus.c', + 'eal_common_cpuflags.c', + 'eal_common_class.c', + 'eal_common_devargs.c', + 'eal_common_dev.c', + 'eal_common_fbarray.c', + 'eal_common_hexdump.c', + 'eal_common_hypervisor.c', + 'eal_common_memalloc.c', + 'eal_common_memory.c', + 'eal_common_memzone.c', + 'eal_common_options.c', + 'eal_common_proc.c', + 'eal_common_string_fns.c', + 'eal_common_tailqs.c', + 'eal_common_thread.c', + 'eal_common_timer.c', + 'eal_common_uuid.c', + 'hotplug_mp.c', + 'malloc_elem.c', + 'malloc_heap.c', + 'malloc_mp.c', + 'rte_keepalive.c', + 'rte_malloc.c', + 'rte_option.c', + 'rte_reciprocal.c', + 'rte_service.c' + ) +endif # get architecture specific sources and objs eal_common_arch_sources = [] eal_common_arch_objs = [] -subdir(join_paths('arch', arch_subdir)) + +common_headers += files( + 'include/rte_branch_prediction.h', + 'include/rte_bus.h', + 'include/rte_common.h', + 'include/rte_debug.h', + 'include/rte_dev.h', + 'include/rte_eal.h', + 'include/rte_errno.h', + 'include/rte_launch.h', + 'include/rte_lcore.h', + 'include/rte_log.h', + 'include/rte_memory.h', + 'include/rte_pci_dev_feature_defs.h', + 'include/rte_per_lcore.h', + 'include/rte_string_fns.h' + ) +if host_machine.system() != 'windows' + subdir(join_paths('arch', arch_subdir)) +endif common_sources += eal_common_arch_sources common_objs += eal_common_arch_objs -common_headers = files( - 'include/rte_alarm.h', - 'include/rte_branch_prediction.h', - 'include/rte_bus.h', - 'include/rte_bitmap.h', - 'include/rte_class.h', - 'include/rte_common.h', - 'include/rte_compat.h', - 'include/rte_debug.h', - 'include/rte_devargs.h', - 'include/rte_dev.h', - 'include/rte_eal.h', - 'include/rte_eal_memconfig.h', - 'include/rte_eal_interrupts.h', - 'include/rte_errno.h', - 'include/rte_fbarray.h', - 'include/rte_hexdump.h', - 'include/rte_hypervisor.h', - 'include/rte_interrupts.h', - 'include/rte_keepalive.h', - 'include/rte_launch.h', - 'include/rte_lcore.h', - 'include/rte_log.h', - 'include/rte_malloc.h', - 'include/rte_malloc_heap.h', - 'include/rte_memory.h', - 'include/rte_memzone.h', - 'include/rte_option.h', - 'include/rte_pci_dev_feature_defs.h', - 'include/rte_pci_dev_features.h', - 'include/rte_per_lcore.h', - 'include/rte_random.h', - 'include/rte_reciprocal.h', - 'include/rte_service.h', - 'include/rte_service_component.h', - 'include/rte_string_fns.h', - 'include/rte_tailq.h', - 'include/rte_time.h', - 'include/rte_uuid.h', - 'include/rte_version.h') +common_headers += files( + 'include/rte_alarm.h', + 'include/rte_bitmap.h', + 'include/rte_class.h', + 'include/rte_compat.h', + 'include/rte_devargs.h', + 'include/rte_eal_memconfig.h', + 'include/rte_eal_interrupts.h', + 'include/rte_fbarray.h', + 'include/rte_hexdump.h', + 'include/rte_hypervisor.h', + 'include/rte_interrupts.h', + 'include/rte_keepalive.h', + 'include/rte_malloc.h', + 'include/rte_malloc_heap.h', + 'include/rte_memzone.h', + 'include/rte_option.h', + 'include/rte_pci_dev_features.h', + 'include/rte_random.h', + 'include/rte_reciprocal.h', + 'include/rte_service.h', + 'include/rte_service_component.h', + 'include/rte_tailq.h', + 'include/rte_time.h', + 'include/rte_uuid.h', + 'include/rte_version.h') # special case install the generic headers, since they go in a subdir generic_headers = files( diff --git a/lib/meson.build b/lib/meson.build index 1fe1b4677..8d7711090 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'] # override libraries for windows +endif + default_cflags = machine_args if cc.has_argument('-Wno-format-truncation') default_cflags += '-Wno-format-truncation' diff --git a/meson.build b/meson.build index 797c86c44..856e94c37 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation project('DPDK', 'C', version: '19.05.0-rc0', @@ -36,28 +36,33 @@ eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) global_inc = include_directories('.', 'config', 'lib/librte_eal/common/include') subdir('config') -# build libs and drivers +# build libs subdir('lib') -subdir('buildtools') -subdir('drivers') -# build binaries and installable tools -subdir('usertools') -subdir('app') +if host_machine.system() != 'windows' + # build buildtools and drivers + subdir('buildtools') + subdir('drivers') -# build docs -subdir('doc') + # build binaries and installable tools + subdir('usertools') + subdir('app') + subdir('test') + + # build kernel modules if enabled + if get_option('enable_kmods') + subdir('kernel') + endif + + # build docs + subdir('doc') +endif # build any examples explicitly requested - useful for developers if get_option('examples') != '' subdir('examples') endif -# build kernel modules if enabled -if get_option('enable_kmods') - subdir('kernel') -endif - # write the build config build_cfg = 'rte_build_config.h' configure_file(output: build_cfg, -- 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 5F2E8A00E6 for ; Wed, 20 Mar 2019 01:42:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5E3CC54AE; Wed, 20 Mar 2019 01:41:16 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 316112956 for ; Wed, 20 Mar 2019 01:40:55 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2019 17:40:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,246,1549958400"; d="scan'208";a="135513438" Received: from anandraw-devbx.amr.corp.intel.com ([10.19.242.57]) by orsmga003.jf.intel.com with ESMTP; 19 Mar 2019 17:40:52 -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: Tue, 19 Mar 2019 17:40:50 -0700 Message-Id: <20190320004050.13184-9-anand.rawat@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20190320004050.13184-1-anand.rawat@intel.com> References: <20190306041634.12976-1-anand.rawat@intel.com> <20190320004050.13184-1-anand.rawat@intel.com> Subject: [dpdk-dev] [PATCH v3 8/8] 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: <20190320004050.weocymvjTX3gT5Vr-rtguq1LmuFVLoWiHUXpnsb0Xp8@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 --- examples/meson.build | 6 +- lib/librte_eal/common/meson.build | 159 ++++++++++++++++-------------- lib/meson.build | 4 + meson.build | 33 ++++--- 4 files changed, 113 insertions(+), 89 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index af81c762e..107e378e7 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -35,7 +35,11 @@ foreach example: examples ext_deps = [execinfo] includes = [include_directories(example)] - deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline'] + if host_machine.system() != 'windows' + deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline'] + else + deps = ['eal'] + endif subdir(example) if build diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build index 5ecae0b1f..05ebd06b6 100644 --- a/lib/librte_eal/common/meson.build +++ b/lib/librte_eal/common/meson.build @@ -1,91 +1,102 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation eal_inc += include_directories('.', 'include', join_paths('include/arch', arch_subdir)) common_objs = [] +common_headers = [] + common_sources = files( - 'eal_common_bus.c', - 'eal_common_cpuflags.c', - 'eal_common_class.c', - 'eal_common_devargs.c', - 'eal_common_dev.c', - 'eal_common_errno.c', - 'eal_common_fbarray.c', - 'eal_common_hexdump.c', - 'eal_common_hypervisor.c', - 'eal_common_launch.c', - 'eal_common_lcore.c', - 'eal_common_log.c', - 'eal_common_memalloc.c', - 'eal_common_memory.c', - 'eal_common_memzone.c', - 'eal_common_options.c', - 'eal_common_proc.c', - 'eal_common_string_fns.c', - 'eal_common_tailqs.c', - 'eal_common_thread.c', - 'eal_common_timer.c', - 'eal_common_uuid.c', - 'hotplug_mp.c', - 'malloc_elem.c', - 'malloc_heap.c', - 'malloc_mp.c', - 'rte_keepalive.c', - 'rte_malloc.c', - 'rte_option.c', - 'rte_reciprocal.c', - 'rte_service.c' -) + 'eal_common_errno.c', + 'eal_common_launch.c', + 'eal_common_lcore.c', + 'eal_common_log.c' + ) +if host_machine.system() != 'windows' + common_sources = files( + 'eal_common_bus.c', + 'eal_common_cpuflags.c', + 'eal_common_class.c', + 'eal_common_devargs.c', + 'eal_common_dev.c', + 'eal_common_fbarray.c', + 'eal_common_hexdump.c', + 'eal_common_hypervisor.c', + 'eal_common_memalloc.c', + 'eal_common_memory.c', + 'eal_common_memzone.c', + 'eal_common_options.c', + 'eal_common_proc.c', + 'eal_common_string_fns.c', + 'eal_common_tailqs.c', + 'eal_common_thread.c', + 'eal_common_timer.c', + 'eal_common_uuid.c', + 'hotplug_mp.c', + 'malloc_elem.c', + 'malloc_heap.c', + 'malloc_mp.c', + 'rte_keepalive.c', + 'rte_malloc.c', + 'rte_option.c', + 'rte_reciprocal.c', + 'rte_service.c' + ) +endif # get architecture specific sources and objs eal_common_arch_sources = [] eal_common_arch_objs = [] -subdir(join_paths('arch', arch_subdir)) + +common_headers += files( + 'include/rte_branch_prediction.h', + 'include/rte_bus.h', + 'include/rte_common.h', + 'include/rte_debug.h', + 'include/rte_dev.h', + 'include/rte_eal.h', + 'include/rte_errno.h', + 'include/rte_launch.h', + 'include/rte_lcore.h', + 'include/rte_log.h', + 'include/rte_memory.h', + 'include/rte_pci_dev_feature_defs.h', + 'include/rte_per_lcore.h', + 'include/rte_string_fns.h' + ) +if host_machine.system() != 'windows' + subdir(join_paths('arch', arch_subdir)) +endif common_sources += eal_common_arch_sources common_objs += eal_common_arch_objs -common_headers = files( - 'include/rte_alarm.h', - 'include/rte_branch_prediction.h', - 'include/rte_bus.h', - 'include/rte_bitmap.h', - 'include/rte_class.h', - 'include/rte_common.h', - 'include/rte_compat.h', - 'include/rte_debug.h', - 'include/rte_devargs.h', - 'include/rte_dev.h', - 'include/rte_eal.h', - 'include/rte_eal_memconfig.h', - 'include/rte_eal_interrupts.h', - 'include/rte_errno.h', - 'include/rte_fbarray.h', - 'include/rte_hexdump.h', - 'include/rte_hypervisor.h', - 'include/rte_interrupts.h', - 'include/rte_keepalive.h', - 'include/rte_launch.h', - 'include/rte_lcore.h', - 'include/rte_log.h', - 'include/rte_malloc.h', - 'include/rte_malloc_heap.h', - 'include/rte_memory.h', - 'include/rte_memzone.h', - 'include/rte_option.h', - 'include/rte_pci_dev_feature_defs.h', - 'include/rte_pci_dev_features.h', - 'include/rte_per_lcore.h', - 'include/rte_random.h', - 'include/rte_reciprocal.h', - 'include/rte_service.h', - 'include/rte_service_component.h', - 'include/rte_string_fns.h', - 'include/rte_tailq.h', - 'include/rte_time.h', - 'include/rte_uuid.h', - 'include/rte_version.h') +common_headers += files( + 'include/rte_alarm.h', + 'include/rte_bitmap.h', + 'include/rte_class.h', + 'include/rte_compat.h', + 'include/rte_devargs.h', + 'include/rte_eal_memconfig.h', + 'include/rte_eal_interrupts.h', + 'include/rte_fbarray.h', + 'include/rte_hexdump.h', + 'include/rte_hypervisor.h', + 'include/rte_interrupts.h', + 'include/rte_keepalive.h', + 'include/rte_malloc.h', + 'include/rte_malloc_heap.h', + 'include/rte_memzone.h', + 'include/rte_option.h', + 'include/rte_pci_dev_features.h', + 'include/rte_random.h', + 'include/rte_reciprocal.h', + 'include/rte_service.h', + 'include/rte_service_component.h', + 'include/rte_tailq.h', + 'include/rte_time.h', + 'include/rte_uuid.h', + 'include/rte_version.h') # special case install the generic headers, since they go in a subdir generic_headers = files( diff --git a/lib/meson.build b/lib/meson.build index 1fe1b4677..8d7711090 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'] # override libraries for windows +endif + default_cflags = machine_args if cc.has_argument('-Wno-format-truncation') default_cflags += '-Wno-format-truncation' diff --git a/meson.build b/meson.build index 797c86c44..856e94c37 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation project('DPDK', 'C', version: '19.05.0-rc0', @@ -36,28 +36,33 @@ eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) global_inc = include_directories('.', 'config', 'lib/librte_eal/common/include') subdir('config') -# build libs and drivers +# build libs subdir('lib') -subdir('buildtools') -subdir('drivers') -# build binaries and installable tools -subdir('usertools') -subdir('app') +if host_machine.system() != 'windows' + # build buildtools and drivers + subdir('buildtools') + subdir('drivers') -# build docs -subdir('doc') + # build binaries and installable tools + subdir('usertools') + subdir('app') + subdir('test') + + # build kernel modules if enabled + if get_option('enable_kmods') + subdir('kernel') + endif + + # build docs + subdir('doc') +endif # build any examples explicitly requested - useful for developers if get_option('examples') != '' subdir('examples') endif -# build kernel modules if enabled -if get_option('enable_kmods') - subdir('kernel') -endif - # write the build config build_cfg = 'rte_build_config.h' configure_file(output: build_cfg, -- 2.17.1.windows.2