D148945-revert
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Wed, 18 Dec 2024 09:01:43 +0000 (10:01 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Wed, 18 Dec 2024 09:01:43 +0000 (10:01 +0100)
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

index 6902cc60c57f5355daf8c63f66fd0bf7c3bddf92..710d5e824756f18c3723b74d0acab36c859b80a9 100644 (file)
@@ -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);
 }