aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek.chauhan@gmail.com>2016-03-19 04:35:47 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2016-03-19 05:39:48 +0530
commit57e01c2964eec589686f8ebfeba4a78d26364e98 (patch)
tree0d6f4cf279383e6b5ec7429862ba2313486bd4c5
parentdc049660e7d5e7c4b4a9ded4acb02fe90860adfb (diff)
downloadmeson-57e01c2964eec589686f8ebfeba4a78d26364e98.zip
meson-57e01c2964eec589686f8ebfeba4a78d26364e98.tar.gz
meson-57e01c2964eec589686f8ebfeba4a78d26364e98.tar.bz2
compilers: While linking, filter out libraries that are bundled with the MSVC runtime
-rw-r--r--mesonbuild/compilers.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index 5461d07..cc554c4 100644
--- a/mesonbuild/compilers.py
+++ b/mesonbuild/compilers.py
@@ -1220,7 +1220,13 @@ class VisualStudioCCompiler(CCompiler):
i = '/LIBPATH:' + i[2:]
# Translate GNU-style -lfoo library name to the import library
if i.startswith('-l'):
- i = i[2:] + '.lib'
+ name = i[2:]
+ if name in ('m', 'c'):
+ # With MSVC, these are provided by the C runtime which is
+ # linked in by default
+ continue
+ else:
+ i = name + '.lib'
result.append(i)
return result