On Sat, 26 Dec 2020 18:08:48 +0200, Tal Shnaiderman wrote:
> diff --git a/lib/librte_eal/windows/meson.build 
> b/lib/librte_eal/windows/meson.build
> index 3b2faf29eb..f4c3e2f12c 100644
> --- a/lib/librte_eal/windows/meson.build
> +++ b/lib/librte_eal/windows/meson.build
> @@ -21,4 +21,10 @@ sources += files(
>       'getopt.c',
>  )
>  
> +if (dpdk_conf.has('use_windows_pthread'))
> +     sources += 'librte_eal/common/rte_thread.c'
> +else
> +     sources += 'librte_eal/windows/rte_thread.c'
> +endif
> +

You need get_option(), not dpdk_conf (apologies again for not being precise
when I drafted the approach):

--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -21,7 +21,7 @@ sources += files(
        'getopt.c',
 )
 
-if (dpdk_conf.has('use_windows_pthread'))
+if get_option('use_windows_pthread')
        sources += 'librte_eal/common/rte_thread.c'
 else
        sources += 'librte_eal/windows/rte_thread.c'

Worse, with -Duse_windows_pthread=true file in common directory includes
<pthread.h>, but it finds pthread shim from windows subdirectory, not the
file from external library or MinGW toolchain. So the option is not usable
until the shim exists. I suggest removing the option for now, let's
reintroduce it when rte_thread.h grows and the shim goes away.


Reply via email to