Skip to content

Commit 217daf2

Browse files
committed
no need to pass spv dir in AOT
Signed-off-by: jinge90 <[email protected]>
1 parent 8bbe976 commit 217daf2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10944,7 +10944,8 @@ static void getNonTripleBasedSYCLPostLinkOpts(const ToolChain &TC,
1094410944

1094510945
// Fallback spv is NOT involved in AOT compilation or
1094610946
// '-fno-sycl-device-lib=all' is applied by user explicitly.
10947-
if (!TC.getTriple().isSPIRAOT() && !DeviceLibDisable) {
10947+
if (TC.getTriple().isSPIROrSPIRV() && !TC.getTriple().isSPIRAOT() &&
10948+
!DeviceLibDisable) {
1094810949
SYCLInstallationDetector SYCLInstall(TC.getDriver());
1094910950
SmallVector<SmallString<128>, 4> SpvLocCandidates;
1095010951
SmallString<128> FallbackAssertName("libsycl-fallback-cassert.spv");

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ runSYCLPostLinkTool(ArrayRef<StringRef> InputFiles, const ArgList &Args) {
729729
CmdArgs.push_back(*SYCLPostLinkPath);
730730
const llvm::Triple Triple(Args.getLastArgValue(OPT_triple_EQ));
731731
Arg *SYCLDeviceLibLoc = Args.getLastArg(OPT_sycl_device_library_location_EQ);
732-
if (SYCLDeviceLibLoc) {
732+
if (SYCLDeviceLibLoc && !Triple.isSPIRAOT()) {
733733
std::string SYCLDeviceLibSPVLoc = SYCLDeviceLibLoc->getValue();
734734
llvm::Triple HostTriple(Args.getLastArgValue(OPT_host_triple_EQ));
735735
if (HostTriple.isOSWindows())

0 commit comments

Comments
 (0)