All symbols exported on wasm target

Sebastiaan Koppe mail at skoppe.eu
Sat Nov 3 11:12:42 UTC 2018


I am doing a lot of wasm [1] compilation with ldc lately, and I 
have noticed that all symbols get exported regardless of what I 
try. E.g. strip-all wont strip any, etc.

When I strip things manually I can sometimes get something from 
90kb to 9kb, so it really is substantial.

According to [2], on clang you can workaround this, by adding 
__attribute__((visibility("default"))) to each function you want 
exported.

Any similar solution for ldc?

[1] https://github.com/skoppe/spasm
[2] https://aransentin.github.io/cwasm/


More information about the digitalmars-d-ldc mailing list