================
@@ -357,6 +357,15 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, 
const ArgList &Args)
 
   Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths);
 
+  // Add -L/path/to/sycl/lib when -fsycl is specified or when libsycl.so is
+  // available. The -lsycl option is added implicitly by -fsycl and links
+  // against the SYCL runtime library (libsycl.so), which is located in this
+  // directory.
+  if (StringRef(D.Dir).starts_with(SysRoot) &&
+      (Args.hasArg(options::OPT_fsycl) ||
+       D.getVFS().exists(D.Dir + "/../lib/libsycl.so")))
+    addPathIfExists(D, D.Dir + "/../lib", Paths);
----------------
jhuber6 wrote:

And attempt in https://github.com/llvm/llvm-project/pull/176019

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

Reply via email to