[PATCH] D119409: [C++20] [Modules] Remain dynamic initializing internal-linkage variables in module interface unit
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 18 16:32:28 PST 2022
dblaikie added a comment.
In D119409#3332476 <https://reviews.llvm.org/D119409#3332476>, @urnathan wrote:
> In D119409#3332313 <https://reviews.llvm.org/D119409#3332313>, @dblaikie wrote:
>
>>
>
> That's interesting data. I guess one could emit the out-of-line bodies into their own sections, and then rely on linker section GC to elide them in the static link.
Yep, that's what I did - they were emitted weak_odr (weak linkage in ELF semantics) - but I was mostly interested in the object size reduction in fully statically linked binaries, so producing redundant or unused descriptions was hurting that goal. (& yeah, shared library issues are a whole other bucket I didn't even consider/evaluate)
> Richard and I discussed taking advantage of this kind of new home location, certainly for key-less polymorphic classes. I was against it as it was more work :) Blame me.
Ah, possibly. ( https://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20170710/198206.html - seems I've had this question for a while (pinged this thread a few times over the years) & never got a clear answer from Richard at least... (@rsmith ?) - but I vaguely remember discussing it, maybe in some more ad-hoc conversation that didn't make it onto the mailing list... )
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119409/new/
https://reviews.llvm.org/D119409
More information about the cfe-commits
mailing list