[libcxx-commits] [clang] [libcxx] [libcxxabi] [Fuchsia][cmake] Allow using FatLTO when building runtimes (PR #112277)

Daniel Thornburgh via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 1 12:52:39 PDT 2024


mysterymath wrote:

The rule established in LLD is that all input files to the link must be known before LTO begins. This is because a set of properties computed from the input files is used as input to LTO codegen, and the results of codegen are not necessarily valid if those properties were to change by the addition of new input files.

In the short term, I'd recommend CMake plumbing to ensure that `-lzircon` is passed to any `.so` or executables that are LTO compiled within the LLVM build.

In the longer term, as Paul mentioned, we now have a relatively accurate list of libcalls available in LLD. This is already used to summarily pull in bitcode that defines potential-used libcalls. We could also scan the files that define potentially-used libcalls for deplibs, and summarily include those in the link. I have an old Phabricator patch for this. The main issue with it was IIRC the libcall listing mechanism it added to LLD, but that has been addressed by the libcall list work.

https://github.com/llvm/llvm-project/pull/112277


More information about the libcxx-commits mailing list