SHA256
1
0
forked from pool/llvm14
llvm14/clang-resourcedirs.patch

14 lines
587 B
Diff
Raw Normal View History

2022-04-04 13:49:45 +02:00
Index: cfe-6.0.0rc1.src/lib/Driver/Driver.cpp
===================================================================
--- cfe-6.0.0rc1.src.orig/lib/Driver/Driver.cpp
+++ cfe-6.0.0rc1.src/lib/Driver/Driver.cpp
@@ -115,7 +115,7 @@ Driver::Driver(StringRef ClangExecutable
// Dir is bin/ or lib/, depending on where BinaryPath is.
std::string Dir = std::string(llvm::sys::path::parent_path(BinaryPath));
- SmallString<128> P(Dir);
+ SmallString<128> P((Dir != "") ? Dir : "/usr/bin/");
if (CustomResourceDir != "") {
llvm::sys::path::append(P, CustomResourceDir);
} else {