From f749550cfe9f0bf2364abb2139835348587062ed Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Fri, 16 Apr 2021 21:33:18 -0700 Subject: [PATCH] [libcxx] Stop using use c++ subdirectory for libc++ library The new layout more closely matches the layout used by other compilers. This is only used when LLVM_ENABLE_PER_TARGET_RUNTIME_DIR is enabled. Differential Revision: https://reviews.llvm.org/D100869 --- clang/include/clang/Driver/ToolChain.h | 4 ++-- clang/lib/Driver/ToolChain.cpp | 12 ++++------ clang/lib/Driver/ToolChains/Fuchsia.cpp | 10 ++++---- .../{c++ => }/asan+noexcept/libc++.so | 0 .../aarch64-fuchsia/{c++ => }/asan/libc++.so | 0 .../lib/aarch64-fuchsia/{c++ => }/libc++.so | 0 .../{c++ => }/noexcept/libc++.so | 0 .../relative-vtables+noexcept/libc++.so | 0 .../{c++ => }/relative-vtables/libc++.so | 0 .../{c++ => }/asan+noexcept/libc++.so | 0 .../x86_64-fuchsia/{c++ => }/asan/libc++.so | 0 .../{c++ => }/hwasan+noexcept/libc++.so | 0 .../x86_64-fuchsia/{c++ => }/hwasan/libc++.so | 0 .../lib/x86_64-fuchsia/{c++ => }/libc++.so | 0 .../{c++ => }/noexcept/libc++.so | 0 .../relative-vtables+asan+noexcept/libc++.so | 0 .../{c++ => }/relative-vtables+asan/libc++.so | 0 .../libc++.so | 0 .../relative-vtables+hwasan/libc++.so | 0 .../relative-vtables+noexcept/libc++.so | 0 .../{c++ => }/relative-vtables/libc++.so | 0 .../usr/lib/x86_64-linux-gnu/{c++ => }/.keep | 0 .../lib/aarch64-fuchsia/asan/.keep | 0 .../lib/aarch64-fuchsia/noexcept/.keep | 0 .../lib/x86_64-fuchsia/asan/.keep | 0 .../lib/x86_64-fuchsia/noexcept/.keep | 0 clang/test/Driver/fuchsia.cpp | 24 +++++++++---------- .../Driver/linux-per-target-runtime-dir.c | 2 +- libcxx/CMakeLists.txt | 4 ++-- libcxxabi/CMakeLists.txt | 4 ++-- libunwind/CMakeLists.txt | 4 ++-- 31 files changed, 30 insertions(+), 34 deletions(-) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/{c++ => }/asan+noexcept/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/{c++ => }/asan/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/{c++ => }/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/{c++ => }/noexcept/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/{c++ => }/relative-vtables+noexcept/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/{c++ => }/relative-vtables/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/{c++ => }/asan+noexcept/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/{c++ => }/asan/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/{c++ => }/hwasan+noexcept/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/{c++ => }/hwasan/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/{c++ => }/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/{c++ => }/noexcept/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/{c++ => }/relative-vtables+asan+noexcept/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/{c++ => }/relative-vtables+asan/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/{c++ => }/relative-vtables+hwasan+noexcept/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/{c++ => }/relative-vtables+hwasan/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/{c++ => }/relative-vtables+noexcept/libc++.so (100%) rename clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/{c++ => }/relative-vtables/libc++.so (100%) rename clang/test/Driver/Inputs/basic_linux_libcxx_tree/usr/lib/x86_64-linux-gnu/{c++ => }/.keep (100%) delete mode 100644 clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/aarch64-fuchsia/asan/.keep delete mode 100644 clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/aarch64-fuchsia/noexcept/.keep delete mode 100644 clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/x86_64-fuchsia/asan/.keep delete mode 100644 clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/x86_64-fuchsia/noexcept/.keep diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h index e5c6b8104c6f..ebe458ccd614 100644 --- a/clang/include/clang/Driver/ToolChain.h +++ b/clang/include/clang/Driver/ToolChain.h @@ -444,8 +444,8 @@ class ToolChain { // Returns target specific runtime path if it exists. virtual Optional getRuntimePath() const; - // Returns target specific C++ library path if it exists. - virtual Optional getCXXStdlibPath() const; + // Returns target specific standard library path if it exists. + virtual Optional getStdlibPath() const; // Returns /lib//. This is used by runtimes (such // as OpenMP) to find arch-specific libraries. diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index e32bbae99fe8..4c5df4069501 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -75,10 +75,8 @@ ToolChain::ToolChain(const Driver &D, const llvm::Triple &T, const ArgList &Args) : D(D), Triple(T), Args(Args), CachedRTTIArg(GetRTTIArgument(Args)), CachedRTTIMode(CalculateRTTIMode(Args, Triple, CachedRTTIArg)) { - if (D.CCCIsCXX()) { - if (auto CXXStdlibPath = getCXXStdlibPath()) - getFilePaths().push_back(*CXXStdlibPath); - } + if (auto StdlibPath = getStdlibPath()) + getFilePaths().push_back(*StdlibPath); if (auto RuntimePath = getRuntimePath()) getLibraryPaths().push_back(*RuntimePath); @@ -500,18 +498,18 @@ Optional ToolChain::getRuntimePath() const { return None; } -Optional ToolChain::getCXXStdlibPath() const { +Optional ToolChain::getStdlibPath() const { SmallString<128> P; // First try the triple passed to driver as --target=. P.assign(D.Dir); - llvm::sys::path::append(P, "..", "lib", D.getTargetTriple(), "c++"); + 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.Dir); - llvm::sys::path::append(P, "..", "lib", Triple.str(), "c++"); + llvm::sys::path::append(P, "..", "lib", Triple.str()); if (getVFS().exists(P)) return llvm::Optional(std::string(P.str())); diff --git a/clang/lib/Driver/ToolChains/Fuchsia.cpp b/clang/lib/Driver/ToolChains/Fuchsia.cpp index 17671b37ad1d..5cc89e242b96 100644 --- a/clang/lib/Driver/ToolChains/Fuchsia.cpp +++ b/clang/lib/Driver/ToolChains/Fuchsia.cpp @@ -189,12 +189,10 @@ Fuchsia::Fuchsia(const Driver &D, const llvm::Triple &Triple, auto FilePaths = [&](const Multilib &M) -> std::vector { std::vector FP; - if (D.CCCIsCXX()) { - if (auto CXXStdlibPath = getCXXStdlibPath()) { - SmallString<128> P(*CXXStdlibPath); - llvm::sys::path::append(P, M.gccSuffix()); - FP.push_back(std::string(P.str())); - } + if (auto StdlibPath = getStdlibPath()) { + SmallString<128> P(*StdlibPath); + llvm::sys::path::append(P, M.gccSuffix()); + FP.push_back(std::string(P.str())); } return FP; }; diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/c++/asan+noexcept/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/asan+noexcept/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/c++/asan+noexcept/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/asan+noexcept/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/c++/asan/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/asan/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/c++/asan/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/asan/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/c++/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/c++/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/c++/noexcept/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/noexcept/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/c++/noexcept/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/noexcept/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/c++/relative-vtables+noexcept/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/relative-vtables+noexcept/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/c++/relative-vtables+noexcept/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/relative-vtables+noexcept/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/c++/relative-vtables/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/relative-vtables/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/c++/relative-vtables/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/aarch64-fuchsia/relative-vtables/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/asan+noexcept/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/asan+noexcept/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/asan+noexcept/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/asan+noexcept/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/asan/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/asan/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/asan/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/asan/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/hwasan+noexcept/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/hwasan+noexcept/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/hwasan+noexcept/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/hwasan+noexcept/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/hwasan/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/hwasan/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/hwasan/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/hwasan/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/noexcept/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/noexcept/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/noexcept/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/noexcept/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/relative-vtables+asan+noexcept/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/relative-vtables+asan+noexcept/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/relative-vtables+asan+noexcept/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/relative-vtables+asan+noexcept/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/relative-vtables+asan/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/relative-vtables+asan/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/relative-vtables+asan/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/relative-vtables+asan/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/relative-vtables+hwasan+noexcept/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/relative-vtables+hwasan+noexcept/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/relative-vtables+hwasan+noexcept/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/relative-vtables+hwasan+noexcept/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/relative-vtables+hwasan/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/relative-vtables+hwasan/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/relative-vtables+hwasan/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/relative-vtables+hwasan/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/relative-vtables+noexcept/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/relative-vtables+noexcept/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/relative-vtables+noexcept/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/relative-vtables+noexcept/libc++.so diff --git a/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/relative-vtables/libc++.so b/clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/relative-vtables/libc++.so similarity index 100% rename from clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/c++/relative-vtables/libc++.so rename to clang/test/Driver/Inputs/basic_fuchsia_tree/lib/x86_64-fuchsia/relative-vtables/libc++.so diff --git a/clang/test/Driver/Inputs/basic_linux_libcxx_tree/usr/lib/x86_64-linux-gnu/c++/.keep b/clang/test/Driver/Inputs/basic_linux_libcxx_tree/usr/lib/x86_64-linux-gnu/.keep similarity index 100% rename from clang/test/Driver/Inputs/basic_linux_libcxx_tree/usr/lib/x86_64-linux-gnu/c++/.keep rename to clang/test/Driver/Inputs/basic_linux_libcxx_tree/usr/lib/x86_64-linux-gnu/.keep diff --git a/clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/aarch64-fuchsia/asan/.keep b/clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/aarch64-fuchsia/asan/.keep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/aarch64-fuchsia/noexcept/.keep b/clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/aarch64-fuchsia/noexcept/.keep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/x86_64-fuchsia/asan/.keep b/clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/x86_64-fuchsia/asan/.keep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/x86_64-fuchsia/noexcept/.keep b/clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/x86_64-fuchsia/noexcept/.keep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/clang/test/Driver/fuchsia.cpp b/clang/test/Driver/fuchsia.cpp index 9177f48fc9e2..dc06984b8820 100644 --- a/clang/test/Driver/fuchsia.cpp +++ b/clang/test/Driver/fuchsia.cpp @@ -142,15 +142,15 @@ // RUN: -fuse-ld=lld 2>&1\ // RUN: | FileCheck %s -check-prefixes=CHECK-MULTILIB-X86,CHECK-MULTILIB-RELATIVE-VTABLES-HWASAN-NOEXCEPT-X86 // CHECK-MULTILIB-X86: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]" -// CHECK-MULTILIB-ASAN-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}c++{{/|\\\\}}asan" -// CHECK-MULTILIB-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}c++{{/|\\\\}}noexcept" -// CHECK-MULTILIB-ASAN-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}c++{{/|\\\\}}asan+noexcept" -// CHECK-MULTILIB-RELATIVE-VTABLES-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}c++{{/|\\\\}}relative-vtables" -// CHECK-MULTILIB-RELATIVE-VTABLES-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}c++{{/|\\\\}}relative-vtables+noexcept" -// CHECK-MULTILIB-RELATIVE-VTABLES-ASAN-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}c++{{/|\\\\}}relative-vtables+asan" -// CHECK-MULTILIB-RELATIVE-VTABLES-ASAN-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}c++{{/|\\\\}}relative-vtables+asan+noexcept" -// CHECK-MULTILIB-HWASAN-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}c++{{/|\\\\}}hwasan" -// CHECK-MULTILIB-HWASAN-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}c++{{/|\\\\}}hwasan+noexcept" -// CHECK-MULTILIB-RELATIVE-VTABLES-HWASAN-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}c++{{/|\\\\}}relative-vtables+hwasan" -// CHECK-MULTILIB-RELATIVE-VTABLES-HWASAN-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}c++{{/|\\\\}}relative-vtables+hwasan+noexcept" -// CHECK-MULTILIB-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}c++" +// CHECK-MULTILIB-ASAN-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}asan" +// CHECK-MULTILIB-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}noexcept" +// CHECK-MULTILIB-ASAN-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}asan+noexcept" +// CHECK-MULTILIB-RELATIVE-VTABLES-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}relative-vtables" +// CHECK-MULTILIB-RELATIVE-VTABLES-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}relative-vtables+noexcept" +// CHECK-MULTILIB-RELATIVE-VTABLES-ASAN-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}relative-vtables+asan" +// CHECK-MULTILIB-RELATIVE-VTABLES-ASAN-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}relative-vtables+asan+noexcept" +// CHECK-MULTILIB-HWASAN-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}hwasan" +// CHECK-MULTILIB-HWASAN-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}hwasan+noexcept" +// CHECK-MULTILIB-RELATIVE-VTABLES-HWASAN-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}relative-vtables+hwasan" +// CHECK-MULTILIB-RELATIVE-VTABLES-HWASAN-NOEXCEPT-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}relative-vtables+hwasan+noexcept" +// CHECK-MULTILIB-X86: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia" diff --git a/clang/test/Driver/linux-per-target-runtime-dir.c b/clang/test/Driver/linux-per-target-runtime-dir.c index 96fa86e11854..ee90fb69d566 100644 --- a/clang/test/Driver/linux-per-target-runtime-dir.c +++ b/clang/test/Driver/linux-per-target-runtime-dir.c @@ -12,7 +12,7 @@ // 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{{.*}}{{/|\\\\}}..{{/|\\\\}}lib{{/|\\\\}}x86_64-linux-gnu" // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \ // RUN: --target=x86_64-linux-gnu \ diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 1621d37810aa..a53493e7fd8e 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -406,9 +406,9 @@ endif () # TODO: Projects that depend on libc++ should use LIBCXX_GENERATED_INCLUDE_DIR # instead of hard-coding include/c++/v1. if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) - set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++) + set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1") - set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++) + set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}) if(LIBCXX_LIBDIR_SUBDIR) string(APPEND LIBCXX_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR}) string(APPEND LIBCXX_INSTALL_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR}) diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt index d54b1c5fa78e..d4eb01ce3888 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -195,8 +195,8 @@ set(CMAKE_MODULE_PATH if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR}) - set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++) - set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++) + set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) + set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}) if(LIBCXX_LIBDIR_SUBDIR) string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR}) string(APPEND LIBCXXABI_INSTALL_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR}) diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt index 10c6b88d26a9..a2c03fd3f8aa 100644 --- a/libunwind/CMakeLists.txt +++ b/libunwind/CMakeLists.txt @@ -115,8 +115,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) - set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++) - set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++) + set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) + set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}) if(LIBCXX_LIBDIR_SUBDIR) string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) string(APPEND LIBUNWIND_INSTALL_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})