File: D148945-revert.diff

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-8
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 1,999,204 kB
  • sloc: cpp: 6,951,711; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,033; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,251; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (23 lines) | stat: -rw-r--r-- 1,083 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Restore that for now, we're not GenToo ...

https://reviews.llvm.org/D148945
https://reviews.llvm.org/D122444

Index: llvm-toolchain-snapshot_19~++20240424094944+78ebaa2d798f/clang/lib/Driver/ToolChains/Linux.cpp
===================================================================
--- llvm-toolchain-snapshot_19~++20240424094944+78ebaa2d798f.orig/clang/lib/Driver/ToolChains/Linux.cpp
+++ llvm-toolchain-snapshot_19~++20240424094944+78ebaa2d798f/clang/lib/Driver/ToolChains/Linux.cpp
@@ -345,6 +345,13 @@ Linux::Linux(const Driver &D, const llvm
 
   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);
 }