diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py index 2865b1f2a..099d907e4 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