Skip to content

Commit 422a2ac

Browse files
Try to fix AMD/NVIDIA targets
1 parent 268c4b4 commit 422a2ac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "llvm/SYCLLowerIR/DeviceConfigFile.hpp"
1414
#include "llvm/Support/CommandLine.h"
1515
#include "llvm/Support/Path.h"
16+
#include "llvm/Support/VirtualFileSystem.h"
1617
#include <sstream>
1718

1819
using namespace clang::driver;
@@ -55,7 +56,7 @@ const char *SYCLInstallationDetector::findLibspirvPath(
5556

5657
// If -fsycl-libspirv-path= is specified, try to use that path directly.
5758
if (Arg *A = Args.getLastArg(options::OPT_fsycl_libspirv_path_EQ)) {
58-
if (llvm::sys::fs::exists(A->getValue()))
59+
if (D.getVFS().exists(A->getValue()))
5960
return A->getValue();
6061

6162
return nullptr;
@@ -69,7 +70,7 @@ const char *SYCLInstallationDetector::findLibspirvPath(
6970
llvm::sys::path::append(LibraryPath, a, b, c, Basename);
7071

7172
if (Args.hasArgNoClaim(options::OPT__HASH_HASH_HASH) ||
72-
llvm::sys::fs::exists(LibraryPath))
73+
D.getVFS().exists(LibraryPath))
7374
return Args.MakeArgString(LibraryPath);
7475

7576
return nullptr;

0 commit comments

Comments
 (0)