[llvm] Fix ExecuteAndWait with empty environment on Windows (PR #158719)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 21 12:27:12 PDT 2025


mstorsjo wrote:

This testcase fails in my test configurations (e.g. https://github.com/mstorsjo/llvm-mingw/actions/runs/17894399079/job/50879057137).

This is because my build environments make binaries that depend on a dynamically linked `libc++.dll`. When trying to execute `SupportTests.exe` with an empty environment, it fails because it fails to find `libc++.dll` in the `PATH`.

It would be possible to avoid this issue by copying in `libc++.dll` and all other potential dependencies (`libunwind.dll`, or `libstdc++-6.dll` and `libgcc_s_seh-1.dll`) into the directory of `SupportTests.exe`, but that's kinda ugly for this case.

This primarily is an issue in mingw build configurations. In theory you could have similar issues in MSVC style environments as well, if linking with `/MD`, but as long as the CRT DLL is available system-wide, and likewise `msvcp140.dll` also is installed in e.g. `windows\system32`, the necessary DLLs are found in the end.

What do you think is the best way around this? Just waive this testcase for mingw environments? Or build a separate simple dummy exe as subject for this testcase?

I think the former is simpler in practice.

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


More information about the llvm-commits mailing list