[lld] [llvm] [LLVM][LTO] Factor out RTLib calls and allow them to be dropped (PR #98512)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 13:06:43 PDT 2024


================
@@ -2428,9 +2428,12 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
       // file's symbol table. If any of those library functions are defined in a
       // bitcode file in an archive member, we need to arrange to use LTO to
       // compile those archive members by adding them to the link beforehand.
-      if (!ctx.bitcodeFileInstances.empty())
-        for (auto *s : lto::LTO::getRuntimeLibcallSymbols())
+      if (!ctx.bitcodeFileInstances.empty()) {
+        llvm::Triple TT(
----------------
jhuber6 wrote:

@MaskRay It's safe to assume that `obj` is always non-null at this point and that all IR files have the same triple, right?

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


More information about the llvm-commits mailing list