[PATCH] D15596: Add -L/path/to/cuda/lib if any of our inputs are CUDA files.

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 6 16:18:00 PST 2016


tra added inline comments.

================
Comment at: lib/Driver/Tools.cpp:276
@@ +275,3 @@
+
+  // Add -L/path/to/cuda/lib if any of our inputs are .cu files.
+  if (std::any_of(C.getActions().begin(), C.getActions().end(), isCudaAction))
----------------
It just struck me that this patch may not be as useful as we'd like it to be.

For typical compilation source-to-object and object-to-executable are separate phases.
We need these flags during linking phase, but we will rarely see any CUDA inputs passed to clang. Most of the time we'll be dealing with .o files and will have no way to tell whether those were compiled from CUDA sources. :-(



http://reviews.llvm.org/D15596





More information about the cfe-commits mailing list