File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
clang/lib/Driver/ToolChains Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -579,6 +579,7 @@ const char *SYCL::Linker::constructLLVMLinkCommand(
579579 auto isSYCLDeviceLib = [&](const InputInfo &II) {
580580 const ToolChain *HostTC = C.getSingleOffloadToolChain <Action::OFK_Host>();
581581 const bool IsNVPTX = this ->getToolChain ().getTriple ().isNVPTX ();
582+ const bool IsAMDGCN = this ->getToolChain ().getTriple ().isAMDGCN ();
582583 const bool IsFPGA = this ->getToolChain ().getTriple ().isSPIR () &&
583584 this ->getToolChain ().getTriple ().getSubArch () ==
584585 llvm::Triple::SPIRSubArch_fpga;
@@ -598,6 +599,8 @@ const char *SYCL::Linker::constructLLVMLinkCommand(
598599 // NativeCPU links against libclc (libspirv)
599600 if (IsSYCLNativeCPU && InputFilename.contains (" libspirv" ))
600601 return true ;
602+ if (IsAMDGCN && InputFilename.starts_with (" devicelib-" ))
603+ return true ;
601604 // NVPTX links against our libclc (libspirv), our libdevice (devicelib),
602605 // and the CUDA libdevice
603606 if (IsNVPTX && (InputFilename.starts_with (" devicelib-" ) ||
You can’t perform that action at this time.
0 commit comments