From 5e45f4c621f14176478e3160e2bb3c6c77796b41 Mon Sep 17 00:00:00 2001 From: Marvin Scholz Date: Sun, 15 Apr 2018 17:58:56 +0200 Subject: 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 --- mesonbuild/compilers/compilers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mesonbuild/compilers/compilers.py') 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 [] -- cgit v1.1