diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-09-28 13:27:43 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-10-01 20:34:46 +0300 |
commit | ae830378edfbc2fe3bdeefe7457c325e14c9cc88 (patch) | |
tree | 317e38e316432cdb04cfc5e6bdcf9cbcb5d35d7e /mesonbuild/compilers/c.py | |
parent | ee80620f6501048aef250195c7950656cfad758b (diff) | |
download | meson-pthread-macos-fix.tar.gz |
compilers/c: don't return -pthread for MacOS with any compilerpthread-macos-fix
With GCC, Clang, or ICC, and for C++
Fixes #2628
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r-- | mesonbuild/compilers/c.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 2da627fc2..72b9f240b 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'] |