From: Anand Rawat Date: Tue, 2 Apr 2019 03:54:58 +0000 (-0700) Subject: build: add workarounds for Windows helloworld X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=fa647c5722b86cdabb1ed60701ef7eb6095bbd66;p=dpdk.git build: add workarounds for Windows helloworld 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 Acked-by: Harini Ramakrishnan --- diff --git a/app/meson.build b/app/meson.build index aa353f6572..e949624b70 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 cdd38ed24e..0209bec8fe 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 8c76a5659a..7520a16e32 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 af81c762e8..d72382fca7 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' @@ -36,6 +36,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 1f0dae3e57..af4f70f009 100644 --- a/lib/librte_eal/windows/eal/meson.build +++ b/lib/librte_eal/windows/eal/meson.build @@ -7,6 +7,12 @@ env_objs = [] env_headers = files( 'include/rte_os.h', ) +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 a7b5a9194c..c3289f885d 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'