diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-11-20 10:20:27 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-12-07 09:35:12 -0800 |
commit | fc547ad05e5a8e650ae5bc2ecc7d40e4dbcc9f0f (patch) | |
tree | 2564b9e98b3a1c0c9ceb5ccc3db87fa69fdb5165 /mesonbuild/compilers/c.py | |
parent | 4ae0cadb7f951691e2913a660a61d024d04b5485 (diff) | |
download | meson-fc547ad05e5a8e650ae5bc2ecc7d40e4dbcc9f0f.zip meson-fc547ad05e5a8e650ae5bc2ecc7d40e4dbcc9f0f.tar.gz meson-fc547ad05e5a8e650ae5bc2ecc7d40e4dbcc9f0f.tar.bz2 |
haiku: do not add pthread arguments
Haiku has pthreads, but they are part of the standard C library, and do
not need either special compiler or linker flags.
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r-- | mesonbuild/compilers/c.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 0f92e78..9c1d1fc 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -16,9 +16,11 @@ import subprocess, os.path, tempfile from .. import mlog from .. import coredata -from ..mesonlib import EnvironmentException, version_compare, Popen_safe, listify -from ..mesonlib import for_windows, for_darwin, for_cygwin from . import compilers +from ..mesonlib import ( + EnvironmentException, version_compare, Popen_safe, listify, + for_windows, for_darwin, for_cygwin, for_haiku, +) from .compilers import ( GCC_MINGW, @@ -281,12 +283,12 @@ class CCompiler(Compiler): # Add compile flags needed by dependencies args += d.get_compile_args() if d.need_threads(): - args += self.thread_flags() + args += self.thread_flags(env) if mode == 'link': # Add link flags needed to find dependencies args += d.get_link_args() if d.need_threads(): - args += self.thread_link_flags() + args += self.thread_link_flags(env) # Select a CRT if needed since we're linking if mode == 'link': args += self.get_linker_debug_crt_args() @@ -781,10 +783,14 @@ class CCompiler(Compiler): return [trial] return None - def thread_flags(self): + def thread_flags(self, env): + if for_haiku(self.is_cross, env): + return [] return ['-pthread'] - def thread_link_flags(self): + def thread_link_flags(self, env): + if for_haiku(self.is_cross, env): + return [] return ['-pthread'] def has_multi_arguments(self, args, env): @@ -1005,10 +1011,10 @@ class VisualStudioCCompiler(CCompiler): return [] # FIXME, no idea what these should be. - def thread_flags(self): + def thread_flags(self, env): return [] - def thread_link_flags(self): + def thread_link_flags(self, env): return [] def get_options(self): |