build: exclude rather than include libs in MSVC build

Message ID 1712076948-25853-2-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded
Delegated to: Thomas Monjalon
Headers
Series build: exclude rather than include libs in MSVC build |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-abi-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS

Commit Message

Tyler Retzlaff April 2, 2024, 4:55 p.m. UTC
  Some libraries that could be built with MSVC were not being built.

Switch from explicit include to exclude of libs to get immediate CI
coverage of libraries that already work with MSVC Windows builds.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/argparse/meson.build |  6 ++++++
 lib/dmadev/meson.build   |  6 ++++++
 lib/mbuf/meson.build     |  6 ++++++
 lib/mempool/meson.build  |  6 ++++++
 lib/meson.build          | 10 ----------
 lib/rcu/meson.build      |  6 ++++++
 lib/stack/meson.build    |  6 ++++++
 7 files changed, 36 insertions(+), 10 deletions(-)
  

Comments

Stephen Hemminger April 2, 2024, 5:15 p.m. UTC | #1
On Tue,  2 Apr 2024 09:55:48 -0700
Tyler Retzlaff <roretzla@linux.microsoft.com> wrote:

> Some libraries that could be built with MSVC were not being built.
> 
> Switch from explicit include to exclude of libs to get immediate CI
> coverage of libraries that already work with MSVC Windows builds.
> 
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

For mbuf, since it requires mempool, you might not need to explicitly
exclude it. But the change looks good.

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
  
Tyler Retzlaff April 2, 2024, 5:19 p.m. UTC | #2
On Tue, Apr 02, 2024 at 10:15:50AM -0700, Stephen Hemminger wrote:
> On Tue,  2 Apr 2024 09:55:48 -0700
> Tyler Retzlaff <roretzla@linux.microsoft.com> wrote:
> 
> > Some libraries that could be built with MSVC were not being built.
> > 
> > Switch from explicit include to exclude of libs to get immediate CI
> > coverage of libraries that already work with MSVC Windows builds.
> > 
> > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> 
> For mbuf, since it requires mempool, you might not need to explicitly
> exclude it. But the change looks good.

interesting, i wonder if the dependency isn't properly working. the way
i chose to exclude libs was to just enable them all and then selectively
disable those that were attempted build but failed. mbuf did not
complain of missing mempool and there was an attempt to build it.

with your changes mempool will build though, just need to wait for it to
merge.

> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
  
Patrick Robb April 5, 2024, 8:33 p.m. UTC | #3
Recheck-request: iol-intel-Functional

Sorry about the spam!

On Tue, Apr 2, 2024 at 12:55 PM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> Some libraries that could be built with MSVC were not being built.
>
> Switch from explicit include to exclude of libs to get immediate CI
> coverage of libraries that already work with MSVC Windows builds.
>
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
>  lib/argparse/meson.build |  6 ++++++
>  lib/dmadev/meson.build   |  6 ++++++
>  lib/mbuf/meson.build     |  6 ++++++
>  lib/mempool/meson.build  |  6 ++++++
>  lib/meson.build          | 10 ----------
>  lib/rcu/meson.build      |  6 ++++++
>  lib/stack/meson.build    |  6 ++++++
>  7 files changed, 36 insertions(+), 10 deletions(-)
>
> diff --git a/lib/argparse/meson.build b/lib/argparse/meson.build
> index b6a08ca..8ab4c40 100644
> --- a/lib/argparse/meson.build
> +++ b/lib/argparse/meson.build
> @@ -1,6 +1,12 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2024 HiSilicon Limited.
>
> +if is_ms_compiler
> +    build = false
> +    reason = 'not supported building with Visual Studio Toolset'
> +    subdir_done()
> +endif
> +
>  sources = files('rte_argparse.c')
>  headers = files('rte_argparse.h')
>
> diff --git a/lib/dmadev/meson.build b/lib/dmadev/meson.build
> index 62b0650..e66dcb6 100644
> --- a/lib/dmadev/meson.build
> +++ b/lib/dmadev/meson.build
> @@ -1,6 +1,12 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2021 HiSilicon Limited.
>
> +if is_ms_compiler
> +    build = false
> +    reason = 'not supported building with Visual Studio Toolset'
> +    subdir_done()
> +endif
> +
>  sources = files('rte_dmadev.c', 'rte_dmadev_trace_points.c')
>  headers = files('rte_dmadev.h')
>  indirect_headers += files('rte_dmadev_core.h', 'rte_dmadev_trace_fp.h')
> diff --git a/lib/mbuf/meson.build b/lib/mbuf/meson.build
> index 0435c5e..2cee905 100644
> --- a/lib/mbuf/meson.build
> +++ b/lib/mbuf/meson.build
> @@ -1,6 +1,12 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017 Intel Corporation
>
> +if is_ms_compiler
> +    build = false
> +    reason = 'not supported building with Visual Studio Toolset'
> +    subdir_done()
> +endif
> +
>  sources = files(
>          'rte_mbuf.c',
>          'rte_mbuf_ptype.c',
> diff --git a/lib/mempool/meson.build b/lib/mempool/meson.build
> index 8099a56..acce66c 100644
> --- a/lib/mempool/meson.build
> +++ b/lib/mempool/meson.build
> @@ -1,6 +1,12 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017 Intel Corporation
>
> +if is_ms_compiler
> +    build = false
> +    reason = 'not supported building with Visual Studio Toolset'
> +    subdir_done()
> +endif
> +
>  extra_flags = []
>
>  foreach flag: extra_flags
> diff --git a/lib/meson.build b/lib/meson.build
> index 179a272..94d2b72 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -68,16 +68,6 @@ libraries = [
>          'node',
>  ]
>
> -if is_ms_compiler
> -    libraries = [
> -            'log',
> -            'kvargs',
> -            'telemetry',
> -            'eal',
> -            'ring',
> -    ]
> -endif
> -
>  always_enable = [
>          'cmdline',
>          'eal',
> diff --git a/lib/rcu/meson.build b/lib/rcu/meson.build
> index 09abc52..71143f5 100644
> --- a/lib/rcu/meson.build
> +++ b/lib/rcu/meson.build
> @@ -1,6 +1,12 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2018 Arm Limited
>
> +if is_ms_compiler
> +    build = false
> +    reason = 'not supported building with Visual Studio Toolset'
> +    subdir_done()
> +endif
> +
>  sources = files('rte_rcu_qsbr.c')
>  headers = files('rte_rcu_qsbr.h')
>
> diff --git a/lib/stack/meson.build b/lib/stack/meson.build
> index 18177a7..7631a14 100644
> --- a/lib/stack/meson.build
> +++ b/lib/stack/meson.build
> @@ -1,6 +1,12 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2019 Intel Corporation
>
> +if is_ms_compiler
> +    build = false
> +    reason = 'not supported building with Visual Studio Toolset'
> +    subdir_done()
> +endif
> +
>  sources = files('rte_stack.c', 'rte_stack_std.c', 'rte_stack_lf.c')
>  headers = files('rte_stack.h')
>  # subheaders, not for direct inclusion by apps
> --
> 1.8.3.1
>
  

Patch

diff --git a/lib/argparse/meson.build b/lib/argparse/meson.build
index b6a08ca..8ab4c40 100644
--- a/lib/argparse/meson.build
+++ b/lib/argparse/meson.build
@@ -1,6 +1,12 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2024 HiSilicon Limited.
 
+if is_ms_compiler
+    build = false
+    reason = 'not supported building with Visual Studio Toolset'
+    subdir_done()
+endif
+
 sources = files('rte_argparse.c')
 headers = files('rte_argparse.h')
 
diff --git a/lib/dmadev/meson.build b/lib/dmadev/meson.build
index 62b0650..e66dcb6 100644
--- a/lib/dmadev/meson.build
+++ b/lib/dmadev/meson.build
@@ -1,6 +1,12 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2021 HiSilicon Limited.
 
+if is_ms_compiler
+    build = false
+    reason = 'not supported building with Visual Studio Toolset'
+    subdir_done()
+endif
+
 sources = files('rte_dmadev.c', 'rte_dmadev_trace_points.c')
 headers = files('rte_dmadev.h')
 indirect_headers += files('rte_dmadev_core.h', 'rte_dmadev_trace_fp.h')
diff --git a/lib/mbuf/meson.build b/lib/mbuf/meson.build
index 0435c5e..2cee905 100644
--- a/lib/mbuf/meson.build
+++ b/lib/mbuf/meson.build
@@ -1,6 +1,12 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_ms_compiler
+    build = false
+    reason = 'not supported building with Visual Studio Toolset'
+    subdir_done()
+endif
+
 sources = files(
         'rte_mbuf.c',
         'rte_mbuf_ptype.c',
diff --git a/lib/mempool/meson.build b/lib/mempool/meson.build
index 8099a56..acce66c 100644
--- a/lib/mempool/meson.build
+++ b/lib/mempool/meson.build
@@ -1,6 +1,12 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_ms_compiler
+    build = false
+    reason = 'not supported building with Visual Studio Toolset'
+    subdir_done()
+endif
+
 extra_flags = []
 
 foreach flag: extra_flags
diff --git a/lib/meson.build b/lib/meson.build
index 179a272..94d2b72 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -68,16 +68,6 @@  libraries = [
         'node',
 ]
 
-if is_ms_compiler
-    libraries = [
-            'log',
-            'kvargs',
-            'telemetry',
-            'eal',
-            'ring',
-    ]
-endif
-
 always_enable = [
         'cmdline',
         'eal',
diff --git a/lib/rcu/meson.build b/lib/rcu/meson.build
index 09abc52..71143f5 100644
--- a/lib/rcu/meson.build
+++ b/lib/rcu/meson.build
@@ -1,6 +1,12 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Arm Limited
 
+if is_ms_compiler
+    build = false
+    reason = 'not supported building with Visual Studio Toolset'
+    subdir_done()
+endif
+
 sources = files('rte_rcu_qsbr.c')
 headers = files('rte_rcu_qsbr.h')
 
diff --git a/lib/stack/meson.build b/lib/stack/meson.build
index 18177a7..7631a14 100644
--- a/lib/stack/meson.build
+++ b/lib/stack/meson.build
@@ -1,6 +1,12 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_ms_compiler
+    build = false
+    reason = 'not supported building with Visual Studio Toolset'
+    subdir_done()
+endif
+
 sources = files('rte_stack.c', 'rte_stack_std.c', 'rte_stack_lf.c')
 headers = files('rte_stack.h')
 # subheaders, not for direct inclusion by apps