================
@@ -19,15 +19,17 @@ SYCLInstallationDetector::SYCLInstallationDetector(
     const Driver &D, const llvm::Triple &HostTriple,
     const llvm::opt::ArgList &Args)
     : D(D) {
-  // Detect the presence of the SYCL runtime library (libsycl.so) in the
+  // Detect the presence of the SYCL runtime library (libLLVMSYCL.so) in the
   // filesystem. This is used to determine whether a usable SYCL installation
   // is available for the current driver invocation.
   StringRef SysRoot = D.SysRoot;
   SmallString<128> DriverDir(D.Dir);
+  SmallString<128> LibPath(DriverDir);
+  llvm::sys::path::append(LibPath, "..", "lib", HostTriple.str(),
+                          "libLLVMSYCL.so");
   if (DriverDir.starts_with(SysRoot) &&
-      (Args.hasArg(options::OPT_fsycl) ||
-       D.getVFS().exists(DriverDir + "/../lib/libsycl.so"))) {
-    llvm::sys::path::append(DriverDir, "..", "lib");
+      (Args.hasArg(options::OPT_fsycl) || D.getVFS().exists(LibPath))) {
----------------
bader wrote:

Do we need to add library path for `-fsycl -fno-sycl`? I think we need to use 
`getLastArg` here instead of `hasArg`.

https://github.com/llvm/llvm-project/pull/188770
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to