================
@@ -0,0 +1,40 @@
+// Test that -print-library-module-manifest-path finds the correct file.
+
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+// RUN: touch %t/libc++.so
+// RUN: split-file %s %t
+// RUN: cd %t
+
+// RUN: %clang -print-library-module-manifest-path \
+// RUN:     -stdlib=libc++ \
+// RUN:     --sysroot=%t \
+// RUN:     --target=x86_64-linux-gnu 2>&1 \
+// RUN:   | FileCheck libcxx-no-module-json.cpp
+
+// RUN: touch %t/modules.json
+// RUN: %clang -print-library-module-manifest-path \
+// RUN:     -stdlib=libc++ \
+// RUN:     --sysroot=%t \
+// RUN:     --target=x86_64-linux-gnu 2>&1 \
+// RUN:   | FileCheck libcxx.cpp
----------------
MaskRay wrote:

`GetFilePath("libc++.so")` may return `libc++.so` (no directory), which does 
not exist.

I think a better test is

```
%clang --target=x86_64-unknown-linux-gnu -ccc-install-dir 
%S/Inputs/basic_linux_libcxx_tree/usr/bin -stdlib=libc++ ...
```
and create an empty file 
`Inputs/basic_linux_libcxx_tree/usr/lib/x86_64-unknown-linux-gnu/libc++.so`

https://github.com/llvm/llvm-project/pull/76451
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to