dmd -Wl=comma_separated_linker_flags (cf clang++ -Wl, comma_separated_linker_flags)

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Wed Feb 22 00:07:35 PST 2017


On 2017-02-21 03:53, Timothee Cour via Digitalmars-d wrote:
> relying on the shell (especially involving arrays) seems like a bad
> idea: not portable, easy to mess up:
>
> `dmd -L{-lbar,-Ldir,--export-dynamic}` works but what if it's stored in $lflags:
>
> lflags="-lbar,-Ldir,--export-dynamic"
>
> the function to convert $lflags to a dmd-appropriate flag is not so
> simple; what do you suggest for that case?

You can pass multiple -L flags:

dmd -L-lbar -L-Ldir -L--export-dynamic

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list