[PATCH] D11573: --cuda-host-only should not disable linking phase.

Artem Belevich tra at google.com
Tue Jul 28 14:02:02 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL243478: --cuda-host-only should not disable linking phase. (authored by tra).

Changed prior to commit:
  http://reviews.llvm.org/D11573?vs=30848&id=30855#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D11573

Files:
  cfe/trunk/lib/Driver/Driver.cpp
  cfe/trunk/test/Driver/cuda-options.cu

Index: cfe/trunk/test/Driver/cuda-options.cu
===================================================================
--- cfe/trunk/test/Driver/cuda-options.cu
+++ cfe/trunk/test/Driver/cuda-options.cu
@@ -27,8 +27,8 @@
 // RUN:   | FileCheck -check-prefix CUDA-ND \
 // Then compile host side and make sure we don't attempt to incorporate GPU code.
 // RUN:    -check-prefix CUDA-H -check-prefix CUDA-H-NI \
-// Make sure we don't link anything.
-// RUN:    -check-prefix CUDA-NL %s
+// Linking is allowed to happen, even if we're missing GPU code.
+// RUN:    -check-prefix CUDA-L %s
 
 // Verify that -cuda-no-host disables host-side compilation and linking
 // RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only %s 2>&1 \
Index: cfe/trunk/lib/Driver/Driver.cpp
===================================================================
--- cfe/trunk/lib/Driver/Driver.cpp
+++ cfe/trunk/lib/Driver/Driver.cpp
@@ -174,10 +174,8 @@
   } else if ((PhaseArg = DAL.getLastArg(options::OPT_S))) {
     FinalPhase = phases::Backend;
 
-    // -c and partial CUDA compilations only run up to the assembler.
-  } else if ((PhaseArg = DAL.getLastArg(options::OPT_c)) ||
-             (PhaseArg = DAL.getLastArg(options::OPT_cuda_device_only)) ||
-             (PhaseArg = DAL.getLastArg(options::OPT_cuda_host_only))) {
+    // -c compilation only runs up to the assembler.
+  } else if ((PhaseArg = DAL.getLastArg(options::OPT_c))) {
     FinalPhase = phases::Assemble;
 
     // Otherwise do everything.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11573.30855.patch
Type: text/x-patch
Size: 1497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150728/06ba65b6/attachment.bin>


More information about the cfe-commits mailing list