diff options
author | Marvin Scholz <epirat07@gmail.com> | 2018-04-15 17:58:56 +0200 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-04-16 03:10:11 +0000 |
commit | 5e45f4c621f14176478e3160e2bb3c6c77796b41 (patch) | |
tree | 9c19f938c204ab3dbbf5bcfbf71e06511f94aa1a /mesonbuild/compilers/compilers.py | |
parent | eadaf92794d9bcd273d21e40a4836a92fc48c9f2 (diff) | |
download | meson-5e45f4c621f14176478e3160e2bb3c6c77796b41.zip meson-5e45f4c621f14176478e3160e2bb3c6c77796b41.tar.gz meson-5e45f4c621f14176478e3160e2bb3c6c77796b41.tar.bz2 |
Do not use -soname when linking with GCC for mingw/cygwin
GNU LD does not use soname when linking a PE/COFF binary, so it makes no
difference, but it breaks when using the llvm linker (lld), which does
not support the soname flag when building PE/COFF binaries for Windows.
Fix #3179
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 934b079..417cbae 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -944,9 +944,11 @@ def get_gcc_soname_args(gcc_type, prefix, shlib_name, suffix, path, soversion, i sostr = '' else: sostr = '.' + soversion - if gcc_type in (GCC_STANDARD, GCC_MINGW, GCC_CYGWIN): - # Might not be correct for mingw but seems to work. + if gcc_type == GCC_STANDARD: return ['-Wl,-soname,%s%s.%s%s' % (prefix, shlib_name, suffix, sostr)] + elif gcc_type in (GCC_MINGW, GCC_CYGWIN): + # For PE/COFF the soname argument has no effect with GNU LD + return [] elif gcc_type == GCC_OSX: if is_shared_module: return [] |