[v3,3/4] build: limit what is built when using MSVC compiler

Message ID 1682453329-20435-4-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series enable use of the MSVC compiler |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff April 25, 2023, 8:08 p.m. UTC
  Build only kvargs and telemetry when is_ms_compiler.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/meson.build       | 5 +++++
 drivers/meson.build   | 4 ++++
 lib/meson.build       | 7 +++++++
 usertools/meson.build | 4 ++++
 4 files changed, 20 insertions(+)
  

Comments

David Marchand Aug. 11, 2023, 1:31 p.m. UTC | #1
On Tue, Apr 25, 2023 at 10:08 PM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> Build only kvargs and telemetry when is_ms_compiler.
>
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  app/meson.build       | 5 +++++
>  drivers/meson.build   | 4 ++++
>  lib/meson.build       | 7 +++++++
>  usertools/meson.build | 4 ++++
>  4 files changed, 20 insertions(+)
>
> diff --git a/app/meson.build b/app/meson.build
> index 74d2420..94fd7c9 100644
> --- a/app/meson.build
> +++ b/app/meson.build
> @@ -1,6 +1,11 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017-2019 Intel Corporation
>
> +if is_ms_compiler
> +    enabled_apps = []

Nit: This could be moved to the top of the tree meson.build:
https://patchwork.dpdk.org/project/dpdk/patch/20230811132805.2434448-1-david.marchand@redhat.com/


> +    subdir_done()
> +endif
> +
>  disable_apps = ',' + get_option('disable_apps')
>  disable_apps = run_command(list_dir_globs, disable_apps, check: true).stdout().split()
>
> diff --git a/drivers/meson.build b/drivers/meson.build
> index 74ae8cb..749ec20 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -1,6 +1,10 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017-2019 Intel Corporation
>
> +if is_ms_compiler
> +    subdir_done()
> +endif
> +
>  fs = import('fs')
>
>  # Defines the order of dependencies evaluation
> diff --git a/lib/meson.build b/lib/meson.build
> index 40c632a..777d3d3 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -66,6 +66,13 @@ libraries = [
>          'node',
>  ]
>
> +if is_ms_compiler
> +    libraries = [

The log library must be added here, now that telemetry depends on it.



> +            'kvargs',
> +            'telemetry',
> +    ]
> +endif
> +
>  optional_libs = [
>          'bitratestats',
>          'cfgfile',
> diff --git a/usertools/meson.build b/usertools/meson.build
> index b6271a2..1a56248 100644
> --- a/usertools/meson.build
> +++ b/usertools/meson.build
> @@ -1,6 +1,10 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017 Intel Corporation
>
> +if is_ms_compiler
> +    subdir_done()
> +endif
> +
>  install_data([
>              'dpdk-devbind.py',
>              'dpdk-pmdinfo.py',
> --
> 1.8.3.1
>
  

Patch

diff --git a/app/meson.build b/app/meson.build
index 74d2420..94fd7c9 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,6 +1,11 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
+if is_ms_compiler
+    enabled_apps = []
+    subdir_done()
+endif
+
 disable_apps = ',' + get_option('disable_apps')
 disable_apps = run_command(list_dir_globs, disable_apps, check: true).stdout().split()
 
diff --git a/drivers/meson.build b/drivers/meson.build
index 74ae8cb..749ec20 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -1,6 +1,10 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
+if is_ms_compiler
+    subdir_done()
+endif
+
 fs = import('fs')
 
 # Defines the order of dependencies evaluation
diff --git a/lib/meson.build b/lib/meson.build
index 40c632a..777d3d3 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -66,6 +66,13 @@  libraries = [
         'node',
 ]
 
+if is_ms_compiler
+    libraries = [
+            'kvargs',
+            'telemetry',
+    ]
+endif
+
 optional_libs = [
         'bitratestats',
         'cfgfile',
diff --git a/usertools/meson.build b/usertools/meson.build
index b6271a2..1a56248 100644
--- a/usertools/meson.build
+++ b/usertools/meson.build
@@ -1,6 +1,10 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_ms_compiler
+    subdir_done()
+endif
+
 install_data([
             'dpdk-devbind.py',
             'dpdk-pmdinfo.py',