echristo accepted this revision.
echristo added a comment.
This revision is now accepted and ready to land.

One inline comment then OK for now.

-eric


================
Comment at: lib/Driver/Tools.cpp:3227-3240
@@ -3226,2 +3226,16 @@
 
+  if (IsCuda) {
+    const ToolChain *AuxToolChain;
+    if (&getToolChain() == C.getCudaDeviceToolChain())
+      AuxToolChain = C.getCudaHostToolChain();
+    else if (&getToolChain() == C.getCudaHostToolChain())
+      AuxToolChain = C.getCudaDeviceToolChain();
+    else
+      llvm_unreachable("Can't figure out CUDA compilation mode.");
+    if (AuxToolChain) {
+      CmdArgs.push_back("-aux-triple");
+      CmdArgs.push_back(Args.MakeArgString(AuxToolChain->getTriple().str()));
+    }
+  }
+
   if (Triple.isOSWindows() && (Triple.getArch() == llvm::Triple::arm ||
----------------
This is pretty heinous. I don't have a better way of doing it offhand, but 
please document this with a rather large FIXME and continue on the path to 
generic compilation support we've been talking about.


http://reviews.llvm.org/D13144



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

Reply via email to