[libcxx-commits] [libcxx] [libc++] Run the Lit test suite against an installed version of the library (PR #96910)

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 23 14:16:35 PDT 2024


mstorsjo wrote:

> @mstorsjo We are still seeing strange failures on Windows and MinGW after fixing the obvious. Windows and MinGW both fail with different modes. The MinGW failures look like (from https://github.com/llvm/llvm-project/actions/runs/9779406851/job/26999519602?pr=96910):
> 
> On MinGW we see only 33 failures:

The reason for this, is that the built libc++ DLL actually isn't found at runtime. In the clang-cl configurations, that means that essentially all tests fail. In the MinGW cases, there's an older libc++ DLL from the toolchain that gets found and used instead, which explains why there's only a handful of failures. Also, in static linking mode, all tests pass.

The reason why the DLL isn't found, is because in an installed tree, the DLL gets installed into `<prefix>/bin`, while we're adding `<prefix>/lib` to the search path. In the intermediate build tree, as things were before, the DLL was located in the `lib` directory.

In `llvm-libc++-shared-clangcl.cfg.in` and `llvm-libc++-mingw.cfg.in`, we have `--prepend_env PATH=%{lib-dir}`; we need to add another substitution in `cmake-bridge.cfg.in`, e.g. `%{runtime-dir}` which gets expanded to `@LIBCXX_TESTING_INSTALL_PREFIX@/@LIBCXX_INSTALL_RUNTIME_DIR@`, and use that instead of `%{lib-dir}` for the `--prepend_env PATH=...`.

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


More information about the libcxx-commits mailing list