[clang] [clang][driver] Add \<executable\>/../include/c++/v1 to include path on Darwin (PR #70817)

Liviu Ionescu via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 13 10:45:56 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
----------------
ilg-ul wrote:

> `// UNSUPPORTED: system-windows`

The current file already has this definition at top. Isn't this enough?

> create a new temporary folder with the appropriate structure, and copy the clang binary into it

What if the binaries are built with absolute RPATH definitions?



https://github.com/llvm/llvm-project/pull/70817


More information about the cfe-commits mailing list