Am 04.02.2014 07:05, schrieb cal:

I need to set -defaultlib=libphobos2.so on linux. Can't use DFLAGS environment variable, since it doesn't seem to work (I guess the issue is this http://d.puremagic.com/issues/show_bug.cgi?id=1660).

DUB supports dflags, but as far as I can tell this only applies during the build step, whereas I need to set the switch during the link step.

Any workarounds for this currently?

The separate compile/link build mode is kind of a strange beast. There
is currently a set of compiler flags which are automatically passed to
the link stage (e.g. -g or -m64). I'll add -defaultlib to this set.

Maybe a better/more generic approach would be to introduce an
"lcflags" field or similar, but I feel that this might be too
difficult to understand or too easy to get wrong when different build
modes/compilers/linkers/target types are involved...