================
@@ -200,3 +209,26 @@ void SYCLToolChain::AddClangCXXStdlibIncludeArgs(const
ArgList &Args,
ArgStringList &CC1Args) const
{
HostTC.AddClangCXXStdlibIncludeArgs(Args, CC1Args);
}
+
+llvm::SmallVector<ToolChain::BitCodeLibraryInfo, 12>
+SYCLToolChain::getDeviceLibs(
+ const llvm::opt::ArgList &DriverArgs, BoundArch /*BA*/,
+ const Action::OffloadKind /*DeviceOffloadingKind*/) const {
+ if (!getTriple().isSPIROrSPIRV())
+ return {};
+ if (!DriverArgs.hasFlag(options::OPT_offloadlib, options::OPT_no_offloadlib,
+ true))
+ return {};
+ // -nolibsycl suppresses all SYCL library injection including device libs.
+ if (DriverArgs.hasArg(options::OPT_nolibsycl))
+ return {};
+
+ SmallString<128> BCPath(getDriver().ResourceDir);
+ llvm::sys::path::append(BCPath, "lib", getTriple().str(),
----------------
jhuber6 wrote:
We really need to hurry up and remove `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` even
being an option. The only reason it's even taken this long is because people
have a bad habit of hard-coding library paths.
https://github.com/llvm/llvm-project/pull/196656
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits