tra added inline comments.

================
Comment at: lib/Driver/ToolChains.cpp:4125
@@ +4124,3 @@
+                              ArgStringList &LDArgs) const {
+  if (DriverArgs.hasArg(options::OPT_nocudalib) || !CudaInstallation.isValid())
+    return;
----------------
I'd rename -nocudalib to -nocudalibdevice (or -nocudabclib) to better reflect 
what it currently does -- disables linking with CUDA's libdevice bitcode.

Then you could use -nocudalib to control automatic addition of CUDA 
library-related options which would be closer to what '-nostdlib' does.

While you're at it, you may consider adding linker flags to link with static 
libcudart. nvcc always adds "-lcudart_static  -lrt -lpthread  -ldl" at the end. 
If user explicitly requests linking with dynamic version of libcudart, then it 
gets linked first, and linker then ignores all the symbols from static lib.



http://reviews.llvm.org/D15596



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

Reply via email to