programmatically get -I and -L flags from dmd; dmd.conf should prepend instead of append?

Timothee Cour via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 8 21:11:24 PST 2016


for the 'dmd.conf should prepend instead of append?' aspect of the
question, I filed https://issues.dlang.org/show_bug.cgi?id=15531


On Mon, Dec 28, 2015 at 6:50 AM, Timothee Cour <thelastmammoth at gmail.com>
wrote:

> I'd like to have a command line flag for dmd (and ldc,gdc) that would be
> the analog to:
> llvm-config --ldflags --cflags
> ie, would print the corresponding flags used by dmd after following the
> internal logic (look for dmd.conf in a number of directories, look for
> DFLAGS environment variable etc).
>
> one use case among others:
>
> when using 'dmd -L-Lfoo -lbar ...', i'd like to first guess which linker
> flags are used by dmd (eg transforming -L-L%@P% into -L-Lsome_path) and
> then call:
> 'dmd -L-Lsome_path -L-Lfoo -lbar ...'
>
> Note that what's actually called is instead:
> 'dmd -L-Lfoo -lbar ... -L-Lsome_path '
> ie, dmd appends instead of prepends the library search path given by
> dmd.conf, which leads to weird behavior if foo (from -L-Lfoo) contains an
> unwanted version of libphobos2
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20160108/2466e967/attachment-0001.html>


More information about the Digitalmars-d mailing list