Merge pull request #1174 from OlCe2/main

meson.build: Comment on 'threads' dependency required for FreeBSD
This commit is contained in:
Kelson 2025-01-15 17:51:23 +01:00 committed by GitHub
commit 664944f16c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,8 +40,10 @@ if not compiler.links(atomics_program,
extra_libs += ['-latomic']
endif
if (compiler.get_id() == 'gcc' and build_machine.system() == 'linux') or host_machine.system() == 'freebsd'
# C++ std::thread is implemented using pthread on linux by gcc
# C++ std::thread is implemented using pthread on Linux by GCC, and on FreeBSD
# for both GCC and LLVM.
if (host_machine.system() == 'linux' and compiler.get_id() == 'gcc') or \
host_machine.system() == 'freebsd'
thread_dep = dependency('threads')
else
thread_dep = dependency('', required:false)