aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/d.py
diff options
context:
space:
mode:
authorMatthias Klumpp <matthias@tenstral.net>2018-08-25 19:25:37 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-10-07 23:42:01 +0300
commitce2eed32bcfaaea5fa551495377a1b4eaa44ea78 (patch)
tree5138b291dd6662f843068c18d798dabff8148d22 /mesonbuild/compilers/d.py
parent4d986563dc3e9f850015619297dec92a102b6bbc (diff)
downloadmeson-ce2eed32bcfaaea5fa551495377a1b4eaa44ea78.zip
meson-ce2eed32bcfaaea5fa551495377a1b4eaa44ea78.tar.gz
meson-ce2eed32bcfaaea5fa551495377a1b4eaa44ea78.tar.bz2
d: Allow static library to be passed with -L to dmd/ldc
Diffstat (limited to 'mesonbuild/compilers/d.py')
-rw-r--r--mesonbuild/compilers/d.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py
index 2865b1f..099d907 100644
--- a/mesonbuild/compilers/d.py
+++ b/mesonbuild/compilers/d.py
@@ -379,8 +379,12 @@ class DCompiler(Compiler):
dcargs.append('-L=' + arg)
continue
-
- dcargs.append(arg)
+ elif not arg.startswith('-') and arg.endswith(('.a', '.lib')):
+ # ensure static libraries are passed through to the linker
+ dcargs.append('-L=' + arg)
+ continue
+ else:
+ dcargs.append(arg)
return dcargs