On Tue, 01 Jun 2010 10:56:47 +0300, Alex Makhotin <a...@bitprox.com> wrote:

So the best way to build release version(assuming two-phase build) should be:

1. Synchronize DMD compilation switches with DMD link switches(-release -O -inline).
2. Pass all the project sources in one DMD cmd line, compile.
3. Link produced object file with other libs.

Am I correct?

"-release -O -inline" are all compiler switches, and do not apply to the linker.

Speaking of link-time optimization:

I assume that the standard library is not subjected to link-time optimization, because all code is used from the .lib.

Doesn't this mean that standard library functions will never be inlined? Even very short functions, that merely return a value? (e.g. range.length)

I suppose that the same applies to the runtime, but if the runtime functions were short enough to be inlined, the compiler could just generate the appropriate machine code instead.

--
Best regards,
 Vladimir                            mailto:vladi...@thecybershadow.net

Reply via email to