[cfe-dev] [libc++] Guarantee that TUs built with different versions of libc++ can be linked together

Louis Dionne via cfe-dev cfe-dev at lists.llvm.org
Tue Aug 14 06:48:44 PDT 2018


Hi,

libc++ currently allows TUs that were built using different versions of libc++ to be linked together. Roughly speaking, this is achieved by making sure that anything not ABI-stable is local to each TU. This also allows distributing a static archive without caring too much about the version of libc++ it was compiled with, at least in principle. Supporting this use case creates code bloat for all users of libc++, since private functions are duplicated in each TU.

I posit that few clients actually care about this, yet everybody is paying for it in terms of executable size. Hence, I would like to change the default guarantee offered by libc++ from "this use case is supported" to "this use case is not supported". The use case would still be supported by defining a macro for those that need it.

Does anybody have objections to this change?

Louis



More information about the cfe-dev mailing list