Meson always returns -pthread in dependency('threads') on non-MSVC compilers. On Windows, zstd uses Windows threading primitives, so we don't need this. Avoid adding -pthread to libzstd's link flags, either as a Meson subproject or via pkg-config Libs.private, so the application doesn't inadvertently depend on winpthreads.
Meson always returns
-pthread
independency('threads')
on non-MSVC compilers. On Windows, zstd uses Windows threading primitives, so we don't need this. Avoid adding-pthread
to libzstd's link flags, either as a Meson subproject or via pkg-configLibs.private
, so the application doesn't inadvertently depend on winpthreads.Merged upstream in https://github.com/facebook/zstd/pull/3931.