From 57894733770690f94b20ee34ca3e5be9d1a4fca9 Mon Sep 17 00:00:00 2001 From: LLVM Packaging Team Date: Tue, 14 Jan 2025 14:16:47 +0100 Subject: [PATCH] D148945-revert Restore that for now, we're not GenToo ... https://reviews.llvm.org/D148945 https://reviews.llvm.org/D122444 Gbp-Pq: Name D148945-revert.diff --- clang/lib/Driver/ToolChains/Linux.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp index 6902cc60c5..710d5e8247 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp @@ -348,6 +348,13 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths); + // The deprecated -DLLVM_ENABLE_PROJECTS=libcxx configuration installs + // libc++.so in D.Dir+"/../lib/". Detect this path. + // TODO Remove once LLVM_ENABLE_PROJECTS=libcxx is unsupported. + if (StringRef(D.Dir).starts_with(SysRoot) && + D.getVFS().exists(D.Dir + "/../lib/libc++.so")) + addPathIfExists(D, D.Dir + "/../lib", Paths); + addPathIfExists(D, concat(SysRoot, "/lib"), Paths); addPathIfExists(D, concat(SysRoot, "/usr/lib"), Paths); } -- 2.30.2