[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 Dec 16 16:18:19 PST 2015


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;
----------------
We may need a new option as -nocudalib is currently used to disable linking with libdevice bitcode library.

================
Comment at: lib/Driver/Tools.cpp:211
@@ +210,3 @@
+static bool isCudaAction(const Action* A) {
+  return CudaDeviceAction::classof(A) || CudaHostAction::classof(A) ||
+         std::any_of(A->getInputs().begin(), A->getInputs().end(),
----------------
Perhaps you want to use isa<CudaDeviceAction>() here.


http://reviews.llvm.org/D15596





More information about the cfe-commits mailing list