aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/d.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/compilers/d.py')
-rw-r--r--mesonbuild/compilers/d.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py
index 6801db7..5433b36 100644
--- a/mesonbuild/compilers/d.py
+++ b/mesonbuild/compilers/d.py
@@ -328,6 +328,17 @@ class DCompiler(Compiler):
# compiler (pass flag through to the linker)
# Hence, we guess here whether the flag was intended to pass
# a linker search path.
+
+ # Make sure static library files are passed properly to the linker.
+ if arg.endswith('.a') or arg.endswith('.lib'):
+ if arg.startswith('-L='):
+ farg = arg[3:]
+ else:
+ farg = arg[2:]
+ if len(farg) > 0 and not farg.startswith('-'):
+ dcargs.append('-L=' + farg)
+ continue
+
dcargs.append('-L=' + arg)
continue