aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2018-09-23 21:18:37 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-09-25 02:43:19 +0300
commit48b6520764ad92a6ac4d830d84526e3dc64f8a22 (patch)
tree8ed5514a0cb592d2e572cf9849c4c3bbae35257f
parent89e0414efd9ccad54c74c04d425c3974e6f64196 (diff)
downloadmeson-48b6520764ad92a6ac4d830d84526e3dc64f8a22.zip
meson-48b6520764ad92a6ac4d830d84526e3dc64f8a22.tar.gz
meson-48b6520764ad92a6ac4d830d84526e3dc64f8a22.tar.bz2
Don't add rpath linker flags when building for MinGW
GNU binutils ld silently ignores -rpath flags when targeting windows (and it is already commented within ninjabackend.py that rpath as concept doesn't exist on windows), and build_rpath_args in VisualStudioCCompiler also returns an empty array. Therefore skip this flag altogether. This fixes linking with lld in MinGW mode, which doesn't support the rpath flag.
-rw-r--r--mesonbuild/compilers/c.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index 3ef18e8..7c6a43b 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -124,6 +124,8 @@ class CCompiler(Compiler):
if getattr(self, 'compiler_type', False) and self.compiler_type.is_osx_compiler:
# Clang, GCC and ICC on macOS all use the same rpath arguments
return self.build_osx_rpath_args(build_dir, rpath_paths, build_rpath)
+ elif self.compiler_type.is_windows_compiler:
+ return []
return self.build_unix_rpath_args(build_dir, from_dir, rpath_paths, build_rpath, install_rpath)
def get_dependency_gen_args(self, outtarget, outfile):