[clang] [clang][driver] Add \<executable\>/../include/c++/v1 to include path on Darwin (PR #70817)
Jon Roelofs via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 13 11:18:52 PST 2023
================
@@ -172,3 +172,20 @@
// RUN: --check-prefix=CHECK-LIBCXX-STDLIB-UNSPECIFIED %s
// CHECK-LIBCXX-STDLIB-UNSPECIFIED: "-cc1"
// CHECK-LIBCXX-STDLIB-UNSPECIFIED: "-internal-isystem" "[[SYSROOT]]/usr/include/c++/v1"
+
+// Reproduce the xPack use case; there must be no include here,
+// to select the executable folder.
+// RUN: rm -rf %t/xpacks
+// RUN: mkdir -pv %t/xpacks/.bin
+// RUN: ln -svf %clang %t/xpacks/.bin/clang
+// The build folders do not include this include; create it.
+// RUN: mkdir -pv $(dirname $(which %clang))/../include/c++/v1
----------------
jroelofs wrote:
> Isn't this enough?
Sorry, missed that. Yes, it is.
> Is this solution used by other tests?
Not that I'm aware of. I don't know of any other tests that need Dir != InstalledDir either.
> What if the binary is built with weird RPATH definitions?
Good point.
https://github.com/llvm/llvm-project/pull/70817
More information about the cfe-commits
mailing list