On Thursday, 11 October 2012 at 22:50:38 UTC, Iain Buclaw wrote:
So the object that interprets pragma(lib) is able to communicate with
the object that handles what flags to pass to the linker. :-)

Yes, and pragma(lib) is already supported in LDC.

This is not possible with gdc, as the driver that handles the calling of ld (gdc) does not / cannot communicate with the compiler component
(cc1d).

Can't you just do something along the lines of having "gdc test.d" internally calling "cc1d -o … --write-additional-libraries-to-this-file=/tmp/unique.library.deps.file.or.pipe" and read from that file/pipe later when linking? Or is this forbidden by some GCC rules?

David

Reply via email to