[PATCH] D76717: feedback
Sam Clegg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 24 10:44:19 PDT 2020
sbc100 created this revision.
Herald added subscribers: cfe-commits, aheejin.
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
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.252370.patch
Type: text/x-patch
Size: 921 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200324/0dbc4226/attachment.bin>
More information about the cfe-commits
mailing list