[clang] [CIR][DYNLIB] Make CIR/MLIR related symbols hidden in libclang-cpp.so. (PR #232409)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 16 00:48:14 PDT 2026
nikic wrote:
Thanks, this does help. After this I'm not seeing any significant increase in startup overhead anymore, at least in casual testing.
libclang-cpp.so size is 72M without CIR, 132M with CIR and 103M with CIR and this patch, so it cuts the size increase roughly by half.
The tradeoff is that cir-opt and cir-translate go from <1M each to ~27M each, because they no longer use the dylib. Probably still worthwhile, the size of those is likely less important.
The fact that libclang-cpp.so shrinks so much (even without LTO) probably indicates that we can still substantially reduce the fraction of MLIR that actually needs to be built as a dependency of CIR? If we end up trivially DCEing half of it...
https://github.com/llvm/llvm-project/pull/232409
More information about the cfe-commits
mailing list