gtbercea created this revision. When composing the output file name, the path to the file is being dropped. The full path is required.
Repository: rL LLVM https://reviews.llvm.org/D37912 Files: lib/Driver/ToolChains/Cuda.cpp Index: lib/Driver/ToolChains/Cuda.cpp =================================================================== --- lib/Driver/ToolChains/Cuda.cpp +++ lib/Driver/ToolChains/Cuda.cpp @@ -438,11 +438,13 @@ if (!II.isFilename()) continue; - SmallString<256> Name = llvm::sys::path::filename(II.getFilename()); + SmallString<256> Name = llvm::sys::path::relative_path(II.getFilename()); + SmallString<256> FullPath = llvm::sys::path::root_path(II.getFilename()); llvm::sys::path::replace_extension(Name, "cubin"); + llvm::sys::path::append(FullPath, Name); const char *CubinF = - C.addTempFile(C.getArgs().MakeArgString(Name)); + C.addTempFile(C.getArgs().MakeArgString(FullPath)); CmdArgs.push_back(CubinF); }
Index: lib/Driver/ToolChains/Cuda.cpp =================================================================== --- lib/Driver/ToolChains/Cuda.cpp +++ lib/Driver/ToolChains/Cuda.cpp @@ -438,11 +438,13 @@ if (!II.isFilename()) continue; - SmallString<256> Name = llvm::sys::path::filename(II.getFilename()); + SmallString<256> Name = llvm::sys::path::relative_path(II.getFilename()); + SmallString<256> FullPath = llvm::sys::path::root_path(II.getFilename()); llvm::sys::path::replace_extension(Name, "cubin"); + llvm::sys::path::append(FullPath, Name); const char *CubinF = - C.addTempFile(C.getArgs().MakeArgString(Name)); + C.addTempFile(C.getArgs().MakeArgString(FullPath)); CmdArgs.push_back(CubinF); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits