diff options
author | Benjamin Gilbert <bgilbert@backtick.net> | 2023-09-23 00:57:14 -0500 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2023-11-08 18:43:10 +0000 |
commit | b4b789df5b39cecdb598b35a3aa2ca9637029564 (patch) | |
tree | c6b1728ced878c4c92cba5940f6e2a2acea99836 | |
parent | 08115a4217e0cb783ab391c2d98edcc3f14d51b6 (diff) |
meson: avoid linking with -pthread if we don't have pthreads
Meson always returns -pthread in dependency('threads') on non-MSVC
compilers. Fix a link error when building on MinGW without winpthreads.
-rw-r--r-- | meson.build | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meson.build b/meson.build index f822fb5..5c896ac 100644 --- a/meson.build +++ b/meson.build @@ -485,6 +485,9 @@ if dep_threads.found() and cc.has_header('pthread.h') else pthreads_found = true endif +else + # Avoid linking with -pthread if we don't actually have pthreads + dep_threads = null_dep endif if pthreads_found |