Skip to content

Commit b2ef5a2

Browse files
committed
Revert "add search path for sycl-jit-toolchain"
This reverts commit 8da81b7.
1 parent 8da81b7 commit b2ef5a2

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,26 +64,20 @@ const char *SYCLInstallationDetector::findLibspirvPath(
6464

6565
const SmallString<64> Basename =
6666
getLibSpirvBasename(DeviceTriple, HostTriple);
67-
auto searchAt = [&](StringRef Path) -> const char * {
68-
SmallString<256> LibraryPath(Path);
69-
llvm::sys::path::append(LibraryPath, "lib", "libclc", Basename);
67+
auto searchAt = [&](StringRef Path, const Twine &a = "", const Twine &b = "",
68+
const Twine &c = "") -> const char * {
69+
SmallString<128> LibraryPath(Path);
70+
llvm::sys::path::append(LibraryPath, a, b, c, Basename);
71+
7072
if (D.getVFS().exists(LibraryPath))
7173
return Args.MakeArgString(LibraryPath);
7274

7375
return nullptr;
7476
};
7577

76-
if (const char *R = searchAt(D.ResourceDir))
78+
if (const char *R = searchAt(D.ResourceDir, "lib", "libclc"))
7779
return R;
7880

79-
// For sycl-jit
80-
for (const auto &IC : InstallationCandidates) {
81-
SmallString<256> ICPath(IC);
82-
llvm::sys::path::append(ICPath, "dummy", "dummy");
83-
if (const char *R = searchAt(D.GetResourcesPath(ICPath)))
84-
return R;
85-
}
86-
8781
return nullptr;
8882
}
8983

0 commit comments

Comments
 (0)