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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to