ldc icon indicating copy to clipboard operation
ldc copied to clipboard

TypeInfo causes excessive binary bloat

Open kinke opened this issue 7 years ago • 2 comments

Based on https://issues.dlang.org/show_bug.cgi?id=14758#c15, DMD has improved wrt. unreferenced TypeInfos ending up in the binary, while LDC still produces fat binaries (at least did in v1.0 according to the comment).

kinke avatar Aug 13 '16 23:08 kinke

If someone could point me in the right direction I could attempt a PR?

danwalmsley avatar Jun 20 '17 12:06 danwalmsley

I think we should actually be in better shape wrt. this than DMD nowadays - class TypeInfos are emitted once in their owning CU only, struct TypeInfos into each referencing CU (so not emitted at all if never referenced - and by referenced, I mean referenced from the codegen layer, no CTFE stuff), and special TypeInfo members only once in their owning CUs (can be stripped by the linker if unreferenced, e.g., if the according struct TypeInfo is never emitted).

kinke avatar Jun 27 '21 00:06 kinke