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'
pull/4287/head
Marvin Scholz 7 years ago committed by Jussi Pakkanen
parent dc7bb37c46
commit 843b0b1d50
  1. 10
      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']

Loading…
Cancel
Save