[v7,8/8] build: meson changes to build on windows
Checks
Commit Message
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>
---
app/meson.build | 6 +++++-
buildtools/meson.build | 6 +++++-
drivers/meson.build | 6 +++++-
examples/meson.build | 8 ++++++--
kernel/windows/meson.build | 4 ++++
lib/librte_eal/windows/eal/meson.build | 6 ++++++
lib/meson.build | 4 ++++
7 files changed, 35 insertions(+), 5 deletions(-)
create mode 100644 kernel/windows/meson.build
Comments
29/03/2019 00:24, Anand Rawat:
> 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.
[...]
> --- 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
Not sure this change deserves a copyright update :)
> --- a/examples/meson.build
> +++ b/examples/meson.build
> - deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']
Please keep this line intact.
> + if host_machine.system() != 'windows'
> + deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']
> + else
> + deps = ['eal'] # only supported lib on windows currently
> + endif
You could override deps for Windows only.
Other workarounds look reasonnable. Thanks
On 4/1/2019 4:25 PM, Thomas Monjalon wrote:
> 29/03/2019 00:24, Anand Rawat:
>> 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.
> [...]
>> --- 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
>
> Not sure this change deserves a copyright update :)
I am not sure either, basic principle that I am following
is if any file is touched with some code/logic the license
should be updated. Do correct me if I am wrong. I can make
the changes accordingly in the future releases.
>
>> --- a/examples/meson.build
>> +++ b/examples/meson.build
>> - deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']
>
> Please keep this line intact.
>
>> + if host_machine.system() != 'windows'
>> + deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']
>> + else
>> + deps = ['eal'] # only supported lib on windows currently
>> + endif
>
> You could override deps for Windows only.
>
Will be updated in v8
@@ -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',
@@ -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')
@@ -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',
@@ -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,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'] # only supported lib on windows currently
+ endif
subdir(example)
if build
new file mode 100644
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2019 Intel Corporation
+
+# stub file for supporting windows logic in future release
@@ -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',
@@ -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'