summaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChain.cpp
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2019-05-27 23:23:50 +0000
committerPetr Hosek <phosek@chromium.org>2019-05-27 23:23:50 +0000
commitcd1a1e62e2684a985f8e6ebcc40b67e5e7467a93 (patch)
tree989b6f7106405af99c04962a69fbf9488b2346d4 /lib/Driver/ToolChain.cpp
parentb84e04d4c031c8ff9a1a6875381f4a34b923cad7 (diff)
downloadclang-cd1a1e62e2684a985f8e6ebcc40b67e5e7467a93.tar.gz
[Driver] Change layout of per-target runtimes to resemble multiarch
This is a follow up to r361432, changing the layout of per-target runtimes to more closely resemble multiarch. While before, we used the following layout: [RESOURCE_DIR]/<target>/lib/libclang_rt.<runtime>.<ext> Now we use the following layout: [RESOURCE_DIR]/lib/<target>/libclang_rt.<runtime>.<ext> This also more closely resembles the existing "non-per-target" layout: [RESOURCE_DIR]/lib/<os>/libclang_rt.<runtime>-<arch>.<ext> This change will enable further simplification of the driver logic in follow up changes. Differential Revision: https://reviews.llvm.org/D62469 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChain.cpp')
-rw-r--r--lib/Driver/ToolChain.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
index 01fb818c9c..6f5e1916e5 100644
--- a/lib/Driver/ToolChain.cpp
+++ b/lib/Driver/ToolChain.cpp
@@ -411,13 +411,13 @@ Optional<std::string> ToolChain::getRuntimePath() const {
// First try the triple passed to driver as --target=<triple>.
P.assign(D.ResourceDir);
- llvm::sys::path::append(P, D.getTargetTriple(), "lib");
+ llvm::sys::path::append(P, "lib", D.getTargetTriple());
if (getVFS().exists(P))
return llvm::Optional<std::string>(P.str());
// Second try the normalized triple.
P.assign(D.ResourceDir);
- llvm::sys::path::append(P, Triple.str(), "lib");
+ llvm::sys::path::append(P, "lib", Triple.str());
if (getVFS().exists(P))
return llvm::Optional<std::string>(P.str());