From a9c09e6004ff1b5344782e698549e9fba041fca9 Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Mon, 19 Dec 2016 23:24:03 +0100 Subject: [PATCH] ldc: Protect linker flags from deduplication This is the better way to pass arguments through to the linker when compiling D code with LDC. --- mesonbuild/backend/backends.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index dc39ce436..10167e863 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -373,7 +373,7 @@ class Backend(): if not isinstance(d, (build.StaticLibrary, build.SharedLibrary)): raise RuntimeError('Tried to link with a non-library target "%s".' % d.get_basename()) if isinstance(compiler, compilers.LLVMDCompiler): - args.extend(['-L', self.get_target_filename_for_linking(d)]) + args += ['-L' + self.get_target_filename_for_linking(d)] else: args.append(self.get_target_filename_for_linking(d)) # If you have executable e that links to shared lib s1 that links to shared library s2