Finally, I do it myself.
May be this is not very good solution, but it works. :)
source/dub/compilers/dmd.d | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/dub/compilers/dmd.d b/source/dub/compilers/dmd.d
index fad3269..edaa79e 100644
--- a/source/dub/compilers/dmd.d
+++ b/source/dub/compilers/dmd.d
@@ -123,7 +123,7 @@ class DmdCompiler : Compiler {
{
import std.string;
auto tpath = Path(settings.targetPath) ~ getTargetFileName(settings, platform);
- auto args = ["dmd", "-of"~tpath.toNativeString()] ~ objects ~ settings.lflags.map!(l => "-L"~l)().array() ~ settings.sourceFiles;
+ auto args = ["dmd", "-of"~tpath.toNativeString()] ~ objects ~ settings.lflags.map!(l => "-L" ~ (l.find("-Wl,") == l ? l.replace("-Wl,", "").replace(",", " -L") : l))().array() ~ settings.sourceFiles;
args ~= settings.dflags.filter!(f => f == "-g" || f == "-gc")().array();
logDebug("%s", args.join(" "));
auto res = spawnProcess(args).wait();