From b05d37db67482af46f45636125d1513f18042029 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 27 Oct 2016 10:56:17 +0530 Subject: compilers: Ignore pthread flags when using MSVC They don't make sense and just cause a build failure. --- mesonbuild/compilers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mesonbuild/compilers.py') 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 -- cgit v1.1