diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-03-20 18:43:49 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-03-20 18:43:49 +0200 |
commit | 1bd3135bcbf73106990dfd980f3b32206a669f37 (patch) | |
tree | 7f8d72b1df9160fc27d5f31b774d019f04a01508 | |
parent | 254a688124f13888dcc828c1572ec6f8f877ea87 (diff) | |
parent | 57e01c2964eec589686f8ebfeba4a78d26364e98 (diff) | |
download | meson-1bd3135bcbf73106990dfd980f3b32206a669f37.zip meson-1bd3135bcbf73106990dfd980f3b32206a669f37.tar.gz meson-1bd3135bcbf73106990dfd980f3b32206a669f37.tar.bz2 |
Merge pull request #461 from nirbheek/msvc-filter-clibs
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 |