File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
clang/lib/Driver/ToolChains Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,13 @@ const char *SYCL::Linker::constructLLVMLinkCommand(
170170 LibPostfix = " .obj" ;
171171 std::string FileName = this ->getToolChain ().getInputFilename (II);
172172 StringRef InputFilename = llvm::sys::path::filename (FileName);
173+ if (this ->getToolChain ().getTriple ().isNVPTX ()) {
174+ // Linking SYCL Device libs requires libclc as well as libdevice
175+ if ((InputFilename.find (" nvidiacl" ) != InputFilename.npos ||
176+ InputFilename.find (" libdevice" ) != InputFilename.npos ))
177+ return true ;
178+ LibPostfix = " .cubin" ;
179+ }
173180 StringRef LibSyclPrefix (" libsycl-" );
174181 if (!InputFilename.startswith (LibSyclPrefix) ||
175182 !InputFilename.endswith (LibPostfix) || (InputFilename.count (' -' ) < 2 ))
You can’t perform that action at this time.
0 commit comments