Iv been trying to figure this one out forever, and its starting to annoy me. I understand the D runtime library. What it is, what it does. I also understand that you can compile
ldc -nodefaultlib -noruntime
I've had success with that. But you'll still want to add:
extern(C) __gshared void* _Dmodule_ref;
extern(C) int main() {}
Note that while the runtime is optional, it is required for a lot of the features. You'll be missing array slicing, (dynamic arrays?), GC, and plenty of others. If you accidentally use one of those features, you'll get plenty of warnings about how it can't find some obscure symbol name.