<div dir="ltr"><a href="http://cuda-version-check.cu">cuda-version-check.cu</a> seems to be failing since this change:<div><a href="http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/1768">http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/1768</a></div><div><br></div><div>The relevant failing part:</div><div><br></div><div><div>$ "C:/b/slave/clang-x86-windows-msvc2015/clang-x86-windows-msvc2015/stage1/./bin/clang.EXE" "-v" "-###" "--cuda-gpu-arch=sm_60" "--sysroot=C:\b\slave\clang-x86-windows-msvc2015\clang-x86-windows-msvc2015\llvm\tools\clang\test\Driver/Inputs/CUDA" "C:\b\slave\clang-x86-windows-msvc2015\clang-x86-windows-msvc2015\llvm\tools\clang\test\Driver\<a href="http://cuda-version-check.cu">cuda-version-check.cu</a>"</div><div>$ "C:/b/slave/clang-x86-windows-msvc2015/clang-x86-windows-msvc2015/stage1/./bin\FileCheck.EXE" "C:\b\slave\clang-x86-windows-msvc2015\clang-x86-windows-msvc2015\llvm\tools\clang\test\Driver\<a href="http://cuda-version-check.cu">cuda-version-check.cu</a>" "--check-prefix=ERR_SM60"</div><div># command stderr:</div><div>C:\b\slave\clang-x86-windows-msvc2015\clang-x86-windows-msvc2015\llvm\tools\clang\test\Driver\cuda-version-check.cu:56:14: error: expected string not found in input</div><div>// ERR_SM60: error: GPU arch sm_60 {{.*}}</div><div>             ^</div><div><stdin>:1:1: note: scanning from here</div><div>clang version 4.0.0 (trunk 291142)</div><div>^</div><div><stdin>:5:12: note: possible intended match here</div><div>clang.EXE: error: cannot find libdevice for sm_60. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.</div><div>           ^</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 5, 2017 at 8:52 AM, Justin Lebar via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: jlebar<br>
Date: Thu Jan  5 10:52:29 2017<br>
New Revision: 291131<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=291131&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=291131&view=rev</a><br>
Log:<br>
[Driver] Driver changes to support CUDA compilation on Windows.<br>
<br>
Summary:<br>
For the most part this is straightforward: Just add a CudaInstallation<br>
object to the MSVC and MinGW toolchains.<br>
<br>
CudaToolChain has to override computeMSVCVersion so that<br>
Clang::constructJob passes the right version flag to cc1.  We have to<br>
modify IsWindowsMSVC and friends in Clang::constructJob to be true when<br>
compiling CUDA device code on Windows for the same reason.<br>
<br>
Depends on: D28319<br>
<br>
Reviewers: tra<br>
<br>
Subscribers: cfe-commits<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D28320" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D28320</a><br>
<br>
Added:<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin/<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin/.keep<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include/<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include/.<wbr>keep<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/.keep<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/<wbr>libdevice/<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/<wbr>libdevice/libdevice.compute_<wbr>30.10.bc<br>
    cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/<wbr>libdevice/libdevice.compute_<wbr>35.10.bc<br>
    cfe/trunk/test/Driver/<a href="http://cuda-windows.cu" rel="noreferrer" target="_blank">cuda-<wbr>windows.cu</a><br>
Modified:<br>
    cfe/trunk/include/clang/<wbr>Driver/ToolChain.h<br>
    cfe/trunk/lib/Driver/<wbr>MSVCToolChain.cpp<br>
    cfe/trunk/lib/Driver/<wbr>MinGWToolChain.cpp<br>
    cfe/trunk/lib/Driver/<wbr>ToolChains.cpp<br>
    cfe/trunk/lib/Driver/<wbr>ToolChains.h<br>
    cfe/trunk/lib/Driver/Tools.cpp<br>
<br>
Modified: cfe/trunk/include/clang/<wbr>Driver/ToolChain.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/ToolChain.h?rev=291131&r1=291130&r2=291131&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/include/<wbr>clang/Driver/ToolChain.h?rev=<wbr>291131&r1=291130&r2=291131&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/include/clang/<wbr>Driver/ToolChain.h (original)<br>
+++ cfe/trunk/include/clang/<wbr>Driver/ToolChain.h Thu Jan  5 10:52:29 2017<br>
@@ -139,6 +139,13 @@ public:<br>
   vfs::FileSystem &getVFS() const;<br>
   const llvm::Triple &getTriple() const { return Triple; }<br>
<br>
+  /// Get the toolchain's aux triple, if it has one.<br>
+  ///<br>
+  /// Exactly what the aux triple represents depends on the toolchain, but for<br>
+  /// example when compiling CUDA code for the GPU, the triple might be NVPTX,<br>
+  /// while the aux triple is the host (CPU) toolchain, e.g. x86-linux-gnu.<br>
+  virtual const llvm::Triple *getAuxTriple() const { return nullptr; }<br>
+<br>
   llvm::Triple::ArchType getArch() const { return Triple.getArch(); }<br>
   StringRef getArchName() const { return Triple.getArchName(); }<br>
   StringRef getPlatform() const { return Triple.getVendorName(); }<br>
<br>
Modified: cfe/trunk/lib/Driver/<wbr>MSVCToolChain.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/MSVCToolChain.cpp?rev=291131&r1=291130&r2=291131&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/Driver/<wbr>MSVCToolChain.cpp?rev=291131&<wbr>r1=291130&r2=291131&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/lib/Driver/<wbr>MSVCToolChain.cpp (original)<br>
+++ cfe/trunk/lib/Driver/<wbr>MSVCToolChain.cpp Thu Jan  5 10:52:29 2017<br>
@@ -47,9 +47,9 @@ using namespace clang::driver::toolchain<br>
 using namespace clang;<br>
 using namespace llvm::opt;<br>
<br>
-MSVCToolChain::MSVCToolChain(<wbr>const Driver &D, const llvm::Triple& Triple,<br>
+MSVCToolChain::MSVCToolChain(<wbr>const Driver &D, const llvm::Triple &Triple,<br>
                              const ArgList &Args)<br>
-  : ToolChain(D, Triple, Args) {<br>
+    : ToolChain(D, Triple, Args), CudaInstallation(D, Triple, Args) {<br>
   getProgramPaths().push_back(<wbr>getDriver().getInstalledDir())<wbr>;<br>
   if (getDriver().getInstalledDir() != getDriver().Dir)<br>
     getProgramPaths().push_back(<wbr>getDriver().Dir);<br>
@@ -94,6 +94,15 @@ bool MSVCToolChain::<wbr>isPICDefaultForced()<br>
   return getArch() == llvm::Triple::x86_64;<br>
 }<br>
<br>
+void MSVCToolChain::<wbr>AddCudaIncludeArgs(const ArgList &DriverArgs,<br>
+                                       ArgStringList &CC1Args) const {<br>
+  CudaInstallation.<wbr>AddCudaIncludeArgs(DriverArgs, CC1Args);<br>
+}<br>
+<br>
+void MSVCToolChain::<wbr>printVerboseInfo(raw_ostream &OS) const {<br>
+  CudaInstallation.print(OS);<br>
+}<br>
+<br>
 #ifdef USE_WIN32<br>
 static bool readFullStringValue(HKEY hkey, const char *valueName,<br>
                                 std::string &value) {<br>
<br>
Modified: cfe/trunk/lib/Driver/<wbr>MinGWToolChain.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/MinGWToolChain.cpp?rev=291131&r1=291130&r2=291131&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/Driver/<wbr>MinGWToolChain.cpp?rev=291131&<wbr>r1=291130&r2=291131&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/lib/Driver/<wbr>MinGWToolChain.cpp (original)<br>
+++ cfe/trunk/lib/Driver/<wbr>MinGWToolChain.cpp Thu Jan  5 10:52:29 2017<br>
@@ -63,7 +63,7 @@ void MinGW::findGccLibDir() {<br>
 }<br>
<br>
 MinGW::MinGW(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)<br>
-    : ToolChain(D, Triple, Args) {<br>
+    : ToolChain(D, Triple, Args), CudaInstallation(D, Triple, Args) {<br>
   getProgramPaths().push_back(<wbr>getDriver().getInstalledDir())<wbr>;<br>
<br>
 // In Windows there aren't any standard install locations, we search<br>
@@ -135,6 +135,15 @@ bool MinGW::UseSEHExceptions() const {<br>
   return getArch() == llvm::Triple::x86_64;<br>
 }<br>
<br>
+void MinGW::AddCudaIncludeArgs(<wbr>const ArgList &DriverArgs,<br>
+                               ArgStringList &CC1Args) const {<br>
+  CudaInstallation.<wbr>AddCudaIncludeArgs(DriverArgs, CC1Args);<br>
+}<br>
+<br>
+void MinGW::printVerboseInfo(raw_<wbr>ostream &OS) const {<br>
+  CudaInstallation.print(OS);<br>
+}<br>
+<br>
 // Include directories for various hosts:<br>
<br>
 // Windows, <a href="http://mingw.org" rel="noreferrer" target="_blank">mingw.org</a><br>
<br>
Modified: cfe/trunk/lib/Driver/<wbr>ToolChains.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=291131&r1=291130&r2=291131&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/Driver/<wbr>ToolChains.cpp?rev=291131&r1=<wbr>291130&r2=291131&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/lib/Driver/<wbr>ToolChains.cpp (original)<br>
+++ cfe/trunk/lib/Driver/<wbr>ToolChains.cpp Thu Jan  5 10:52:29 2017<br>
@@ -1810,14 +1810,21 @@ CudaInstallationDetector::<wbr>CudaInstallati<br>
     : D(D) {<br>
   SmallVector<std::string, 4> CudaPathCandidates;<br>
<br>
-  if (Args.hasArg(options::OPT_<wbr>cuda_path_EQ))<br>
+  // In decreasing order so we prefer newer versions to older versions.<br>
+  std::initializer_list<const char *> Versions = {"8.0", "7.5", "7.0"};<br>
+<br>
+  if (Args.hasArg(options::OPT_<wbr>cuda_path_EQ)) {<br>
     CudaPathCandidates.push_back(<br>
         Args.getLastArgValue(options::<wbr>OPT_cuda_path_EQ));<br>
-  else {<br>
+  } else if (HostTriple.isOSWindows()) {<br>
+    for (const char *Ver : Versions)<br>
+      CudaPathCandidates.push_back(<br>
+          D.SysRoot + "/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v" +<br>
+          Ver);<br>
+  } else {<br>
     CudaPathCandidates.push_back(<wbr>D.SysRoot + "/usr/local/cuda");<br>
-    CudaPathCandidates.push_back(<wbr>D.SysRoot + "/usr/local/cuda-8.0");<br>
-    CudaPathCandidates.push_back(<wbr>D.SysRoot + "/usr/local/cuda-7.5");<br>
-    CudaPathCandidates.push_back(<wbr>D.SysRoot + "/usr/local/cuda-7.0");<br>
+    for (const char *Ver : Versions)<br>
+      CudaPathCandidates.push_back(<wbr>D.SysRoot + "/usr/local/cuda-" + Ver);<br>
   }<br>
<br>
   for (const auto &CudaPath : CudaPathCandidates) {<br>
@@ -5021,6 +5028,11 @@ SanitizerMask CudaToolChain::getSupporte<br>
   return HostTC.getSupportedSanitizers(<wbr>);<br>
 }<br>
<br>
+VersionTuple CudaToolChain::<wbr>computeMSVCVersion(const Driver *D,<br>
+                                               const ArgList &Args) const {<br>
+  return HostTC.computeMSVCVersion(D, Args);<br>
+}<br>
+<br>
 /// XCore tool chain<br>
 XCoreToolChain::<wbr>XCoreToolChain(const Driver &D, const llvm::Triple &Triple,<br>
                                const ArgList &Args)<br>
<br>
Modified: cfe/trunk/lib/Driver/<wbr>ToolChains.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.h?rev=291131&r1=291130&r2=291131&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/Driver/<wbr>ToolChains.h?rev=291131&r1=<wbr>291130&r2=291131&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/lib/Driver/<wbr>ToolChains.h (original)<br>
+++ cfe/trunk/lib/Driver/<wbr>ToolChains.h Thu Jan  5 10:52:29 2017<br>
@@ -709,12 +709,19 @@ public:<br>
       const llvm::opt::ArgList &DriverArgs,<br>
       llvm::opt::ArgStringList &CC1Args) const override;<br>
<br>
+  void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs,<br>
+                          llvm::opt::ArgStringList &CC1Args) const override;<br>
+<br>
+  void printVerboseInfo(raw_ostream &OS) const override;<br>
+<br>
 protected:<br>
   Tool *getTool(Action::ActionClass AC) const override;<br>
   Tool *buildLinker() const override;<br>
   Tool *buildAssembler() const override;<br>
<br>
 private:<br>
+  CudaInstallationDetector CudaInstallation;<br>
+<br>
   std::string Base;<br>
   std::string GccLibDir;<br>
   std::string Ver;<br>
@@ -892,6 +899,10 @@ public:<br>
   CudaToolChain(const Driver &D, const llvm::Triple &Triple,<br>
                 const ToolChain &HostTC, const llvm::opt::ArgList &Args);<br>
<br>
+  virtual const llvm::Triple *getAuxTriple() const override {<br>
+    return &HostTC.getTriple();<br>
+  }<br>
+<br>
   llvm::opt::DerivedArgList *<br>
   TranslateArgs(const llvm::opt::DerivedArgList &Args, StringRef BoundArch,<br>
                 Action::OffloadKind DeviceOffloadKind) const override;<br>
@@ -924,6 +935,10 @@ public:<br>
<br>
   SanitizerMask getSupportedSanitizers() const override;<br>
<br>
+  VersionTuple<br>
+  computeMSVCVersion(const Driver *D,<br>
+                     const llvm::opt::ArgList &Args) const override;<br>
+<br>
   const ToolChain &HostTC;<br>
   CudaInstallationDetector CudaInstallation;<br>
<br>
@@ -1147,6 +1162,9 @@ public:<br>
       const llvm::opt::ArgList &DriverArgs,<br>
       llvm::opt::ArgStringList &CC1Args) const override;<br>
<br>
+  void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs,<br>
+                          llvm::opt::ArgStringList &CC1Args) const override;<br>
+<br>
   bool getWindowsSDKDir(std::string &path, int &major,<br>
                         std::string &windowsSDKIncludeVersion,<br>
                         std::string &windowsSDKLibVersion) const;<br>
@@ -1166,6 +1184,8 @@ public:<br>
                                           types::ID InputType) const override;<br>
   SanitizerMask getSupportedSanitizers() const override;<br>
<br>
+  void printVerboseInfo(raw_ostream &OS) const override;<br>
+<br>
 protected:<br>
   void AddSystemIncludeWithSubfolder(<wbr>const llvm::opt::ArgList &DriverArgs,<br>
                                      llvm::opt::ArgStringList &CC1Args,<br>
@@ -1179,6 +1199,8 @@ protected:<br>
 private:<br>
   VersionTuple getMSVCVersionFromTriple() const;<br>
   VersionTuple getMSVCVersionFromExe() const;<br>
+<br>
+  CudaInstallationDetector CudaInstallation;<br>
 };<br>
<br>
 class LLVM_LIBRARY_VISIBILITY CrossWindowsToolChain : public Generic_GCC {<br>
<br>
Modified: cfe/trunk/lib/Driver/Tools.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=291131&r1=291130&r2=291131&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/Driver/<wbr>Tools.cpp?rev=291131&r1=<wbr>291130&r2=291131&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/lib/Driver/Tools.cpp (original)<br>
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Jan  5 10:52:29 2017<br>
@@ -4086,13 +4086,6 @@ void Clang::ConstructJob(<wbr>Compilation &C,<br>
   const Driver &D = getToolChain().getDriver();<br>
   ArgStringList CmdArgs;<br>
<br>
-  bool IsWindowsGNU = getToolChain().getTriple().<wbr>isWindowsGNUEnvironment();<br>
-  bool IsWindowsCygnus =<br>
-      getToolChain().getTriple().<wbr>isWindowsCygwinEnvironment();<br>
-  bool IsWindowsMSVC = getToolChain().getTriple().<wbr>isWindowsMSVCEnvironment();<br>
-  bool IsPS4CPU = getToolChain().getTriple().<wbr>isPS4CPU();<br>
-  bool IsIAMCU = getToolChain().getTriple().<wbr>isOSIAMCU();<br>
-<br>
   // Check number of inputs for sanity. We need at least one input.<br>
   assert(Inputs.size() >= 1 && "Must have at least one input.");<br>
   const InputInfo &Input = Inputs[0];<br>
@@ -4106,6 +4099,23 @@ void Clang::ConstructJob(<wbr>Compilation &C,<br>
           Inputs.size() == 1) &&<br>
          "Unable to handle multiple inputs.");<br>
<br>
+  bool IsWindowsGNU = getToolChain().getTriple().<wbr>isWindowsGNUEnvironment();<br>
+  bool IsWindowsCygnus =<br>
+      getToolChain().getTriple().<wbr>isWindowsCygwinEnvironment();<br>
+  bool IsWindowsMSVC = getToolChain().getTriple().<wbr>isWindowsMSVCEnvironment();<br>
+  bool IsPS4CPU = getToolChain().getTriple().<wbr>isPS4CPU();<br>
+  bool IsIAMCU = getToolChain().getTriple().<wbr>isOSIAMCU();<br>
+<br>
+  // Adjust IsWindowsXYZ for CUDA compilations.  Even when compiling in device<br>
+  // mode (i.e., getToolchain().getTriple() is NVPTX, not Windows), we need to<br>
+  // pass Windows-specific flags to cc1.<br>
+  if (IsCuda) {<br>
+    const llvm::Triple *AuxTriple = getToolChain().getAuxTriple();<br>
+    IsWindowsMSVC |= AuxTriple && AuxTriple-><wbr>isWindowsMSVCEnvironment();<br>
+    IsWindowsGNU |= AuxTriple && AuxTriple-><wbr>isWindowsGNUEnvironment();<br>
+    IsWindowsCygnus |= AuxTriple && AuxTriple-><wbr>isWindowsCygwinEnvironment();<br>
+  }<br>
+<br>
   // C++ is not supported for IAMCU.<br>
   if (IsIAMCU && types::isCXX(Input.getType()))<br>
     D.Diag(diag::err_drv_clang_<wbr>unsupported) << "C++ for IAMCU";<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin/.keep<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/CUDA-windows/Program%20Files/NVIDIA%20GPU%20Computing%20Toolkit/CUDA/v8.0/bin/.keep?rev=291131&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/Driver/<wbr>Inputs/CUDA-windows/Program%<wbr>20Files/NVIDIA%20GPU%<wbr>20Computing%20Toolkit/CUDA/v8.<wbr>0/bin/.keep?rev=291131&view=<wbr>auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
    (empty)<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include/.<wbr>keep<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/CUDA-windows/Program%20Files/NVIDIA%20GPU%20Computing%20Toolkit/CUDA/v8.0/include/.keep?rev=291131&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/Driver/<wbr>Inputs/CUDA-windows/Program%<wbr>20Files/NVIDIA%20GPU%<wbr>20Computing%20Toolkit/CUDA/v8.<wbr>0/include/.keep?rev=291131&<wbr>view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
    (empty)<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/.keep<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/CUDA-windows/Program%20Files/NVIDIA%20GPU%20Computing%20Toolkit/CUDA/v8.0/lib/.keep?rev=291131&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/Driver/<wbr>Inputs/CUDA-windows/Program%<wbr>20Files/NVIDIA%20GPU%<wbr>20Computing%20Toolkit/CUDA/v8.<wbr>0/lib/.keep?rev=291131&view=<wbr>auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
    (empty)<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/<wbr>libdevice/libdevice.compute_<wbr>30.10.bc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/CUDA-windows/Program%20Files/NVIDIA%20GPU%20Computing%20Toolkit/CUDA/v8.0/nvvm/libdevice/libdevice.compute_30.10.bc?rev=291131&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/Driver/<wbr>Inputs/CUDA-windows/Program%<wbr>20Files/NVIDIA%20GPU%<wbr>20Computing%20Toolkit/CUDA/v8.<wbr>0/nvvm/libdevice/libdevice.<wbr>compute_30.10.bc?rev=291131&<wbr>view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
    (empty)<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/<wbr>CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/<wbr>libdevice/libdevice.compute_<wbr>35.10.bc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/CUDA-windows/Program%20Files/NVIDIA%20GPU%20Computing%20Toolkit/CUDA/v8.0/nvvm/libdevice/libdevice.compute_35.10.bc?rev=291131&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/Driver/<wbr>Inputs/CUDA-windows/Program%<wbr>20Files/NVIDIA%20GPU%<wbr>20Computing%20Toolkit/CUDA/v8.<wbr>0/nvvm/libdevice/libdevice.<wbr>compute_35.10.bc?rev=291131&<wbr>view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
    (empty)<br>
<br>
Added: cfe/trunk/test/Driver/<a href="http://cuda-windows.cu" rel="noreferrer" target="_blank">cuda-<wbr>windows.cu</a><br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cuda-windows.cu?rev=291131&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/Driver/<wbr>cuda-windows.cu?rev=291131&<wbr>view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/Driver/<a href="http://cuda-windows.cu" rel="noreferrer" target="_blank">cuda-<wbr>windows.cu</a> (added)<br>
+++ cfe/trunk/test/Driver/<a href="http://cuda-windows.cu" rel="noreferrer" target="_blank">cuda-<wbr>windows.cu</a> Thu Jan  5 10:52:29 2017<br>
@@ -0,0 +1,14 @@<br>
+// REQUIRES: clang-driver<br>
+// REQUIRES: x86-registered-target<br>
+// REQUIRES: nvptx-registered-target<br>
+//<br>
+// RUN: %clang -v --target=i386-pc-windows-msvc \<br>
+// RUN:   --sysroot=%S/Inputs/CUDA-<wbr>windows 2>&1 %s -### | FileCheck %s<br>
+// RUN: %clang -v --target=i386-pc-windows-<wbr>mingw32 \<br>
+// RUN:   --sysroot=%S/Inputs/CUDA-<wbr>windows 2>&1 %s -### | FileCheck %s<br>
+<br>
+// CHECK: Found CUDA installation: {{.*}}/Inputs/CUDA-windows/<wbr>Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0<br>
+// CHECK: "-cc1" "-triple" "nvptx-nvidia-cuda"<br>
+// CHECK-SAME: "-fms-extensions"<br>
+// CHECK-SAME: "-fms-compatibility"<br>
+// CHECK-SAME: "-fms-compatibility-version=<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>