aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-10-27 10:56:17 +0530
committerJussi Pakkanen <jpakkane@gmail.com>2016-10-27 10:51:26 -0700
commitb05d37db67482af46f45636125d1513f18042029 (patch)
tree56d419c0b781c08a7cbaaf8e7c65426b9cb25525 /mesonbuild/compilers.py
parent33323bb7e301a4148ca1cdb8d3feb11201fdbe66 (diff)
downloadmeson-b05d37db67482af46f45636125d1513f18042029.zip
meson-b05d37db67482af46f45636125d1513f18042029.tar.gz
meson-b05d37db67482af46f45636125d1513f18042029.tar.bz2
compilers: Ignore pthread flags when using MSVC
They don't make sense and just cause a build failure.
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r--mesonbuild/compilers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index b7613aa..2d7a080 100644
--- a/mesonbuild/compilers.py
+++ b/mesonbuild/compilers.py
@@ -1775,7 +1775,7 @@ class VisualStudioCCompiler(CCompiler):
# Translate GNU-style -lfoo library name to the import library
elif i.startswith('-l'):
name = i[2:]
- if name in ('m', 'c'):
+ if name in ('m', 'c', 'pthread'):
# With MSVC, these are provided by the C runtime which is
# linked in by default
continue
@@ -1788,7 +1788,8 @@ class VisualStudioCCompiler(CCompiler):
result = []
for i in args:
# -mms-bitfields is specific to MinGW-GCC
- if i == '-mms-bitfields':
+ # -pthread is only valid for GCC
+ if i in ('-mms-bitfields', '-pthread'):
continue
result.append(i)
return result