From ce2eed32bcfaaea5fa551495377a1b4eaa44ea78 Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Sat, 25 Aug 2018 19:25:37 +0200 Subject: d: Allow static library to be passed with -L to dmd/ldc --- mesonbuild/compilers/d.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mesonbuild/compilers/d.py') 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 -- cgit v1.1