[PATCH v2 2/2] buildtools: when building static library use static deps
Bruce Richardson
bruce.richardson at intel.com
Fri Apr 12 16:09:12 CEST 2024
On Thu, Mar 14, 2024 at 11:30:22PM -0700, Tyler Retzlaff wrote:
> Use static deps when default_library=static and use shared deps when
> using default_library=shared.
>
> Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> ---
> buildtools/chkincs/meson.build | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build
> index f2dadca..66245a5 100644
> --- a/buildtools/chkincs/meson.build
> +++ b/buildtools/chkincs/meson.build
> @@ -20,11 +20,19 @@ sources += gen_c_files.process(dpdk_chkinc_headers)
>
> # some driver SDK headers depend on these two buses, which are mandatory in build
> # so we always include them in deps list
> -deps = [get_variable('shared_rte_bus_vdev'), get_variable('shared_rte_bus_pci')]
> -# add the rest of the libs to the dependencies
> -foreach l:dpdk_libs_enabled
> - deps += get_variable('shared_rte_' + l)
> -endforeach
shorter fix might be to use get_option('default_library') in place of the
"shared" string, rather than using a condition.
/Bruce
> +if is_shared_enabled
> + deps = [get_variable('shared_rte_bus_vdev'), get_variable('shared_rte_bus_pci')]
> + # add the rest of the libs to the dependencies
> + foreach l:dpdk_libs_enabled
> + deps += get_variable('shared_rte_' + l)
> + endforeach
> +else
> + deps = [get_variable('static_rte_bus_vdev'), get_variable('static_rte_bus_pci')]
> + # add the rest of the libs to the dependencies
> + foreach l:dpdk_libs_enabled
> + deps += get_variable('static_rte_' + l)
> + endforeach
> +endif
>
> executable('chkincs', sources,
> c_args: cflags,
> --
> 1.8.3.1
>
More information about the dev
mailing list