aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/c.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-09-28 13:27:43 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2018-10-01 12:34:46 -0700
commit6cf7d2492b634d08cf55ff22ca5106f4d8352838 (patch)
tree5fdc5da8b816b4057b12c0cbee1b86546db3aaf0 /mesonbuild/compilers/c.py
parentddc15e1bba1d43c76e29da165c50bef4e6bec343 (diff)
downloadmeson-6cf7d2492b634d08cf55ff22ca5106f4d8352838.zip
meson-6cf7d2492b634d08cf55ff22ca5106f4d8352838.tar.gz
meson-6cf7d2492b634d08cf55ff22ca5106f4d8352838.tar.bz2
compilers/c: don't return -pthread for MacOS with any compiler
With GCC, Clang, or ICC, and for C++ Fixes #2628
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r--mesonbuild/compilers/c.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index 2da627f..72b9f24 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -986,12 +986,12 @@ class CCompiler(Compiler):
return self.find_library_impl(libname, env, extra_dirs, code, libtype)
def thread_flags(self, env):
- if for_haiku(self.is_cross, env):
+ if for_haiku(self.is_cross, env) or for_darwin(self.is_cross, env):
return []
return ['-pthread']
def thread_link_flags(self, env):
- if for_haiku(self.is_cross, env):
+ if for_haiku(self.is_cross, env) or for_darwin(self.is_cross, env):
return []
return ['-pthread']
@@ -1076,16 +1076,6 @@ 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']