From 48b6520764ad92a6ac4d830d84526e3dc64f8a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sun, 23 Sep 2018 21:18:37 +0200 Subject: 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. --- mesonbuild/compilers/c.py | 2 ++ 1 file changed, 2 insertions(+) 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): -- cgit v1.1