[PATCH] D59168: [runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and include/c++
Petr Hosek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 22 14:07:22 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rC361432: [runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and… (authored by phosek, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D59168?vs=197241&id=200817#toc
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59168/new/
https://reviews.llvm.org/D59168
Files:
lib/Driver/ToolChain.cpp
lib/Driver/ToolChains/Fuchsia.cpp
lib/Driver/ToolChains/Linux.cpp
test/Driver/Inputs/basic_linux_libcxx_tree/usr/lib/x86_64-linux-gnu/.keep
test/Driver/Inputs/basic_linux_libcxx_tree/usr/lib/x86_64-linux-gnu/c++/.keep
test/Driver/linux-per-target-runtime-dir.c
Index: lib/Driver/ToolChains/Fuchsia.cpp
===================================================================
--- lib/Driver/ToolChains/Fuchsia.cpp
+++ lib/Driver/ToolChains/Fuchsia.cpp
@@ -305,8 +305,8 @@
switch (GetCXXStdlibType(DriverArgs)) {
case ToolChain::CST_Libcxx: {
- SmallString<128> P(getDriver().ResourceDir);
- llvm::sys::path::append(P, "include", "c++", "v1");
+ SmallString<128> P(getDriver().Dir);
+ llvm::sys::path::append(P, "..", "include", "c++", "v1");
addSystemInclude(DriverArgs, CC1Args, P.str());
break;
}
Index: lib/Driver/ToolChains/Linux.cpp
===================================================================
--- lib/Driver/ToolChains/Linux.cpp
+++ lib/Driver/ToolChains/Linux.cpp
@@ -889,7 +889,6 @@
llvm::opt::ArgStringList &CC1Args) const {
const std::string& SysRoot = computeSysRoot();
const std::string LibCXXIncludePathCandidates[] = {
- DetectLibcxxIncludePath(getDriver().ResourceDir + "/include/c++"),
DetectLibcxxIncludePath(getDriver().Dir + "/../include/c++"),
// If this is a development, non-installed, clang, libcxx will
// not be found at ../include/c++ but it likely to be found at
Index: lib/Driver/ToolChain.cpp
===================================================================
--- lib/Driver/ToolChain.cpp
+++ lib/Driver/ToolChain.cpp
@@ -75,6 +75,13 @@
CachedRTTIMode(CalculateRTTIMode(Args, Triple, CachedRTTIArg)) {
SmallString<128> P;
+ if (D.CCCIsCXX()) {
+ P.assign(D.Dir);
+ llvm::sys::path::append(P, "..", "lib", D.getTargetTriple(), "c++");
+ 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))
Index: test/Driver/linux-per-target-runtime-dir.c
===================================================================
--- test/Driver/linux-per-target-runtime-dir.c
+++ test/Driver/linux-per-target-runtime-dir.c
@@ -1,4 +1,4 @@
-// RUN: %clang -no-canonical-prefixes -x c++ %s -### -o %t.o 2>&1 \
+// RUN: %clangxx -no-canonical-prefixes -x c++ %s -### -o %t.o 2>&1 \
// RUN: --target=x86_64-linux-gnu \
// RUN: -stdlib=libc++ \
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
@@ -9,9 +9,10 @@
// CHECK-PER-TARGET-RUNTIME: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
// CHECK-PER-TARGET-RUNTIME: "-resource-dir" "[[RESDIR:[^"]*]]"
// CHECK-PER-TARGET-RUNTIME: "-isysroot" "[[SYSROOT:[^"]+]]"
-// CHECK-PER-TARGET-RUNTIME: "-internal-isystem" "[[RESDIR]]/include/c++/v1"
+// CHECK-PER-TARGET-RUNTIME: "-internal-isystem" "{{.*}}/../include/c++/v1"
// CHECK-PER-TARGET-RUNTIME: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
// CHECK-PER-TARGET-RUNTIME: "--sysroot=[[SYSROOT]]"
+// CHECK-PER-TARGET-RUNTIME: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-linux-gnu{{/|\\\\}}c++"
// CHECK-PER-TARGET-RUNTIME: "-L[[RESDIR]]{{/|\\\\}}x86_64-linux-gnu{{/|\\\\}}lib"
// RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59168.200817.patch
Type: text/x-patch
Size: 3087 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190522/88fdec12/attachment.bin>
More information about the cfe-commits
mailing list