[clang] [llvm] [clang][sycl][nvlink] Share static library linking in Frontend/Offloading (PR #201253)

Yury Plyakhin via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 4 09:58:53 PDT 2026


================
@@ -283,12 +318,15 @@ struct LinkResult {
 /// 3. Gather all library bitcode images.
 /// 4. Link all the images gathered in Step 3 with the output of Step 2 using
 /// linkInModule API. LinkOnlyNeeded flag is used.
-static Expected<LinkResult> linkInputs(ArrayRef<std::string> InputFiles,
-                                       const ArgList &Args, LLVMContext &C) {
+static Expected<LinkResult>
+linkInputs(ArrayRef<std::unique_ptr<MemoryBuffer>> InputBuffers,
+           const ArgList &Args, LLVMContext &C) {
   llvm::TimeTraceScope TimeScope("Link code");
 
-  assert(InputFiles.size() && "No inputs to link");
+  assert(InputBuffers.size() && "No inputs to link");
 
+  // TODO: Drop --bc-library in favor of the -l / .a archive path once it is
----------------
YuriPlyakhin wrote:

we discussed offline, that we don't have a use case for .bc file libraries, so I think this patch is a good opportunity to get rid of this option to not keep tech debt.

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


More information about the cfe-commits mailing list