How to stop DMD from exploding the executable file size?

wjoe invalid at example.com
Thu Sep 8 15:46:12 UTC 2022


On Monday, 5 September 2022 at 17:31:10 UTC, ryuukk_ wrote:
> This is a DMD problem, i am a user, my expectation is it should 
> produce a non bloated executable, that's it, as a user i think 
> that's fair to expect that from a compiler that produce native 
> executables
>
> And i show you the release build, on debug it is worse, 
> building 10+mbs files constantly, it'll worn the disk, and it 
> makes file transfer painfully slow over the net
>
> Again, i am a user, not a compiler person

Not a compiler person but a user, too.
Since DMD is the reference compiler my expectations are:
1) the code it compiles, any other D compiler will do as well, 
without requiring modifications to the code
2) the result won't be optimized, neither size nor speed, as well 
as using e.g. LDC or GDC
3) fast
4) it may not support every platform and/or OS

If you're concerned about wearing out your hard drive why don't 
you build on a RAM drive ?
You can add a step to your build config to compress your 
executable for faster file transfers over the net.
If you don't have a build file you can always write a quick make 
file with a default target and add any flag you want - defining 
your own defaults - as well as any steps you need to have done 
pre/post compilation.

When you promote D what stops you to mention that DMD is the 
reference compiler and as such won't produce the best results for 
deployment and there's LDC and GDC, etc. which about everyone 
uses for that purpose?


More information about the Digitalmars-d mailing list