Fully statically linked binary

Jacob Carlborg via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Tue Jul 11 01:14:59 PDT 2017

With LDC it's possible to build a fully statically linked binary using 
the "-static" flag. My question is: is it required to invoke the 
compiler with the "-static" flag or is it enough to invoke the linker 
with the "-static" flag?

I'm not sure if the code generation will be different when doing a fully 
statically linked binary. I think I've read somewhere that different TLS 
models might be used depending on if static or dynamic linking is used.

This is on Linux (and possible on FreeBSD if static linking works there).

/Jacob Carlborg

More information about the digitalmars-d-ldc mailing list