[v3] drivers/common: enable Windows common mlx5 compilation

Message ID 20210103080013.8964-1-talshn@nvidia.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [v3] drivers/common: enable Windows common mlx5 compilation |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-testing fail Testing issues
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Tal Shnaiderman Jan. 3, 2021, 8 a.m. UTC
  From: Ophir Munk <ophirmu@nvidia.com>

Prior to this commit meson did not progress beyond directory
drivers/common for Windows compilations.  This commit enables drivers
compilation under this directory.

Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
v3: change commit place with dependencies.
Depends-on: patch-82392 ("net/mlx5: fix flow sample definitions")
Depends-on: patch-85737 ("mlx5: split multi-threaded flows per OS")
Depends-on: patch-85621 ("build: i40e PMD on Windows")
---
 drivers/common/meson.build      | 8 +++-----
 drivers/common/mlx5/meson.build | 4 ++--
 2 files changed, 5 insertions(+), 7 deletions(-)
  

Comments

Thomas Monjalon Jan. 11, 2021, 8:52 p.m. UTC | #1
03/01/2021 09:00, Tal Shnaiderman:
> From: Ophir Munk <ophirmu@nvidia.com>
> 
> Prior to this commit meson did not progress beyond directory
> drivers/common for Windows compilations.  This commit enables drivers
> compilation under this directory.
> 
> Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
> --- a/drivers/common/meson.build
> +++ b/drivers/common/meson.build
> @@ -1,10 +1,8 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2018 Cavium, Inc
>  
> -if is_windows
> -	subdir_done()
> +if not is_windows
> +	std_deps = ['eal']
> +	drivers = ['cpt', 'dpaax', 'iavf', 'mvep', 'octeontx', 'octeontx2', 'sfc_efx']
>  endif
> -
> -std_deps = ['eal']
> -drivers = ['cpt', 'dpaax', 'iavf', 'mvep', 'octeontx', 'octeontx2', 'sfc_efx']

The change in drivers/common/meson.build is useless.
common/mlx5 is called directly from drivers/meson.build

And when one of these drivers will support Windows,
the Windows check will have to move in drivers file.
  

Patch

diff --git a/drivers/common/meson.build b/drivers/common/meson.build
index d78882f05e..be97424548 100644
--- a/drivers/common/meson.build
+++ b/drivers/common/meson.build
@@ -1,10 +1,8 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Cavium, Inc
 
-if is_windows
-	subdir_done()
+if not is_windows
+	std_deps = ['eal']
+	drivers = ['cpt', 'dpaax', 'iavf', 'mvep', 'octeontx', 'octeontx2', 'sfc_efx']
 endif
-
-std_deps = ['eal']
-drivers = ['cpt', 'dpaax', 'iavf', 'mvep', 'octeontx', 'octeontx2', 'sfc_efx']
 config_flag_fmt = 'RTE_LIBRTE_@0@_COMMON'
diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build
index 3dacc6f683..3047b455cf 100644
--- a/drivers/common/mlx5/meson.build
+++ b/drivers/common/mlx5/meson.build
@@ -1,9 +1,9 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2019 Mellanox Technologies, Ltd
 
-if not is_linux
+if not (is_linux or (is_windows and is_ms_linker))
 	build = false
-	reason = 'only supported on Linux'
+	reason = 'only supported on Linux and Windows build with clang'
 	subdir_done()
 endif