Compile to non-OS binary

Adam D. Ruppe destructionator at gmail.com
Sun Dec 24 03:24:36 UTC 2017


On Sunday, 24 December 2017 at 03:15:58 UTC, Amorphorious wrote:
> In fact, it would be very helpful to have switches that disable 
> the various "features" of D that I will not use rather than 
> having to do any self compilation.

The way I did it was create a custom runtime only including the 
features I wanted, then use `-defaultlib=` to disable linking in 
the library.. There's also the `-betterC` switch that will skip 
things like this too.

This is my old code, but emphasis on old, I haven't updated it 
for over a year and runtime hacks like this tend to need tweaks 
to keep working http://arsdnet.net/dcode/minimal.zip

I believe gdc also has several flags to disable individual 
features.


More information about the Digitalmars-d-learn mailing list