[PATCH] D76717: feedback
Sam Clegg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 25 18:58:19 PDT 2020
sbc100 updated this revision to Diff 252723.
sbc100 added a comment.
rebase
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76717/new/
https://reviews.llvm.org/D76717
Files:
clang/lib/Driver/Driver.cpp
Index: clang/lib/Driver/Driver.cpp
===================================================================
--- clang/lib/Driver/Driver.cpp
+++ clang/lib/Driver/Driver.cpp
@@ -136,14 +136,17 @@
if (!this->VFS)
this->VFS = llvm::vfs::getRealFileSystem();
- if (llvm::sys::path::is_relative(SysRoot)) {
- SysRoot = GetResourcesPath(ClangExecutable, SysRoot);
- }
-
Name = std::string(llvm::sys::path::filename(ClangExecutable));
Dir = std::string(llvm::sys::path::parent_path(ClangExecutable));
InstalledDir = Dir; // Provide a sensible default installed dir.
+ if (llvm::sys::path::is_relative(SysRoot)) {
+ // Prepend InstalledDir if SysRoot is relative
+ SmallString<128> fullpath(InstalledDir);
+ llvm::sys::path::append(fullpath, SysRoot);
+ SysRoot = std::string(fullpath);
+ }
+
#if defined(CLANG_CONFIG_FILE_SYSTEM_DIR)
SystemConfigDir = CLANG_CONFIG_FILE_SYSTEM_DIR;
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76717.252723.patch
Type: text/x-patch
Size: 921 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200326/982aff70/attachment-0001.bin>
More information about the cfe-commits
mailing list