diff options
| author | Petr Hosek <phosek@chromium.org> | 2019-03-08 05:35:22 +0000 |
|---|---|---|
| committer | Petr Hosek <phosek@chromium.org> | 2019-03-08 05:35:22 +0000 |
| commit | 60510251f0c7e121e59a5477103c53e69833ca56 (patch) | |
| tree | d463fa89f066c3e8f84d16e9690862dce2b90850 /lib/Driver/ToolChain.cpp | |
| parent | ae78f33054b081980625557c31599d3548954461 (diff) | |
| download | clang-60510251f0c7e121e59a5477103c53e69833ca56.tar.gz | |
[runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/
This change is a consequence of the discussion in "RFC: Place libs in
Clang-dedicated directories", specifically the suggestion that
libunwind, libc++abi and libc++ shouldn't be using Clang resource
directory. Tools like clangd make this assumption, but this is
currently not true for the LLVM_ENABLE_PER_TARGET_RUNTIME_DIR build.
This change addresses that by moving the output of these libraries to
lib/<target> and include/ directories, leaving resource directory only
for compiler-rt runtimes and Clang builtin headers.
Differential Revision: https://reviews.llvm.org/D59013
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355665 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChain.cpp')
| -rw-r--r-- | lib/Driver/ToolChain.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp index a89983d955..056fd449db 100644 --- a/lib/Driver/ToolChain.cpp +++ b/lib/Driver/ToolChain.cpp @@ -75,6 +75,11 @@ ToolChain::ToolChain(const Driver &D, const llvm::Triple &T, CachedRTTIMode(CalculateRTTIMode(Args, Triple, CachedRTTIArg)) { SmallString<128> P; + P.assign(D.Dir); + llvm::sys::path::append(P, "..", "lib", D.getTargetTriple()); + if (getVFS().exists(P)) + getLibraryPaths().push_back(P.str()); + P.assign(D.ResourceDir); llvm::sys::path::append(P, D.getTargetTriple(), "lib"); if (getVFS().exists(P)) |
