diff --git a/source/dub/compilers/ldc.d b/source/dub/compilers/ldc.d index db39741..02559c4 100644 --- a/source/dub/compilers/ldc.d +++ b/source/dub/compilers/ldc.d @@ -269,6 +269,9 @@ private static bool isLinkerDFlag(string arg) { + if (arg.length > 2 && arg.startsWith("--")) + arg = arg[1 .. $]; // normalize to 1 leading hyphen + switch (arg) { case "-g", "-gc", "-m32", "-m64", "-shared", "-lib", "-betterC", "-disable-linker-strip-dead", "-static":