DUB Build Linker Library Search Path

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 11 04:27:52 PDT 2015


On Friday, 10 July 2015 at 12:26:02 UTC, Per Nordlöw wrote:
> On Friday, 10 July 2015 at 12:04:53 UTC, Nordlöw wrote:
>> Should be
>>
>>     LFLAGS="-L/usr/lib/llvm-3.6/lib" dub build 
>> --compiler=/usr/bin/dmd
>>
>> but still fails
>
> I can't find any place in the DUB sources that reads `LFLAGS` 
> from the environment. Only one place when `DFLAGS` is read.
>
> A regression? Do you want me to add this?

Hmm, an observation related to this topic.

I've started using dub-0.9.24-beta.2 with the intention of 
converting to the new SDLang format.
When reading the documentation I noticed that it is possible to 
specify environment flags in the .sdl-file.

"Can I use this to pass a -L linker flag?..."
dub.sdl:
..
lflags "-lclang" "$LFLAGS"

bash$ LFLAGS="/..." dub build -c release

It works :)


More information about the Digitalmars-d-learn mailing list