What can be done to reduce executable size?

Jacob Carlborg doob at me.com
Sun Dec 11 14:15:29 PST 2011


On 2011-12-10 16:39, Bane wrote:
> Short term and long term suggestions ? Anything we can do ? I heard it
> is some problem with linking dead code?
>
>
>
> import std.stdio;
> int main(){
> writefln("Hello Bloat!");
> return 0;
> }
>
> dmd -release -O hello.d
>
> On Windows:
> v1.071 = 339 Kb
> v2.056 = 1017 Kb
>
> It looks very ugly and might distract some people.

As long as the runtime and standard library is statically linked the 
executables will be bigger than the corresponding C/C++ executable.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list