build: add workarounds for Windows helloworld
authorAnand Rawat <anand.rawat@intel.com>
Tue, 2 Apr 2019 03:54:58 +0000 (20:54 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 2 Apr 2019 23:21:31 +0000 (01:21 +0200)
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 <anand.rawat@intel.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>
app/meson.build
buildtools/meson.build
drivers/meson.build
examples/meson.build
lib/librte_eal/windows/eal/meson.build
lib/meson.build

index aa353f6..e949624 100644 (file)
@@ -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',
index cdd38ed..0209bec 100644 (file)
@@ -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')
 
index 8c76a56..7520a16 100644 (file)
@@ -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',
index af81c76..d72382f 100644 (file)
@@ -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
index 1f0dae3..af4f70f 100644 (file)
@@ -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',
index a7b5a91..c3289f8 100644 (file)
@@ -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'