From 843b0b1d5075f83fdd4c5e52a363f9f315c47365 Mon Sep 17 00:00:00 2001 From: Marvin Scholz Date: Wed, 26 Sep 2018 13:54:00 +0200 Subject: [PATCH] compilers: Do not use -pthread with clang for darwin Using the -pthread argument is not needed with clang when compiling for darwin, and it results in the warning: warning: argument unused during compilation: '-pthread' --- mesonbuild/compilers/c.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 7c6a43b5a..2da627fc2 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -1076,6 +1076,16 @@ class ClangCCompiler(ClangCompiler, CCompiler): 'none')}) return opts + def thread_flags(self, env): + if for_darwin(self.is_cross, env): + return [] + return super().thread_flags() + + def thread_link_flags(self, env): + if for_darwin(self.is_cross, env): + return [] + return super().thread_link_flags() + def get_option_compile_args(self, options): args = [] std = options['c_std']