I have been using x86-64-pc-windows-gnullvm since it got promoted to Tier 2 with Mingw-w64 CLANG C toolchain. However sometime earlier this year I noticed that the std library also got a dependency: libunwind.dll.
I don't know what std used instead before to generate completely stand-alone executables. Now I need libunwind.dll to be shipped with them. It is not the end of the world but now I need to adjust my build pipelines to discover the path of libunwind.dll and package it.
Mingw-w64 CLANG64 actually ships the statically linked libunwind.a variant (which I can link to the C/C++ programs). Is it possible to somehow guide rustc to use a statically linked variant too? I tried changing my $CARGO_HOME/config.toml as below but since std dynamically links libunwind.dll, I think this doesn't work:
Here are the screenshots from the DLL dependencies from the latest stable (1.87) and the version I used to use 1.83. Something has changed and now there is an external dependency on libunwind.dll:
Add the [target.x86_64-pc-windows-gnullvm] rustflags = ["-C", "target-feature=+crt-static"]
Build passing the path to the llvm-mingw like this: PATH=$PATH:/home/user/llvm-mingw/output/bin cargo build --target=x86_64-pc-windows-gnullvm --release
Running the resulting dumbpipe.exe on a windows machine requires the libunwind.dll file to be available instead of being statically linked.