================
@@ -497,6 +497,11 @@ Expected<SmallVector<StringRef>> getInput(const ArgList 
&Args) {
       continue;
     }
 
+    // Skip '-lcudadevrt'.
+    if (Arg->getOption().matches(OPT_library) &&
+        StringRef(Arg->getValue()) == "cudadevrt")
----------------
darkbuck wrote:

`cudadevrt` is different from `libdevice`. The latter is a NVVM/LLVM bitcode 
library, but the former is a CUDA fatbin 
(`/usr/local/cuda/targets/x86_64-linux/lib/libcudadevrt.a` for the default 
installation), which has only stubs of those 2 device functions (in PTX and 
SASS) for device-side kernel launch. We need to pass `-lcudadevrt` to `nvlink`. 
AFAIK, there's no option to forward that optino as well as `-L <path>` from 
`clang-nvlink-wrapper` to `nvlink`. Do we need additional option to enable that 
forwarding from `clang-nvlink-wrapper` to `nvlink`.
I agreed that `-Xoffload-linker` makes the change to `clang-linker-wrapper` 
unnecessary.

https://github.com/llvm/llvm-project/pull/165519
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to