jhuber6 added inline comments.

================
Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:1278
+      if (identify_magic((*BufferOrErr)->getBuffer()) != file_magic::archive)
+        continue;
+
----------------
jdoerfert wrote:
> jhuber6 wrote:
> > jdoerfert wrote:
> > > So if the library is found but not an archive we silently continue still?
> > In that case it won't be used for device linking so the host linker will 
> > handle that.
> Can you add a comment, I still don't understand when/how this happens but a 
> comment might do.
Sorry I didn't explain the logic correctly. The `else` means that we will error 
on any library that's found but not present in the linker wrapper. This 
conditional simply ensures that we only attempt to extract offloading files if 
it's in a static library.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137180/new/

https://reviews.llvm.org/D137180

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to