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 | 28302c66d2586074f77497d5dc4eac7182b679e0 (patch) | |
tree | 97f4f3a2694715600b503377dcc93cfbeea1fb12 /clang/lib/Driver/ToolChain.cpp | |
parent | a453455cee6767589638caca2f533184577ec745 (diff) | |
download | llvm-28302c66d2586074f77497d5dc4eac7182b679e0.zip llvm-28302c66d2586074f77497d5dc4eac7182b679e0.tar.gz llvm-28302c66d2586074f77497d5dc4eac7182b679e0.tar.bz2 |
[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
llvm-svn: 355665
Diffstat (limited to 'clang/lib/Driver/ToolChain.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChain.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index a89983d..056fd44 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/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)) |