On 12 October 2012 10:47, David Nadlinger <s...@klickverbot.at> wrote: > 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
Don't think that would be a simple thing to do in the current infrastructure. -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';