diff options
author | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2016-03-19 04:35:47 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2016-03-19 05:39:48 +0530 |
commit | 57e01c2964eec589686f8ebfeba4a78d26364e98 (patch) | |
tree | 0d6f4cf279383e6b5ec7429862ba2313486bd4c5 | |
parent | dc049660e7d5e7c4b4a9ded4acb02fe90860adfb (diff) | |
download | meson-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.py | 8 |
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 |