Description
Describe the bug
rust sanity check has hardcoded filename, that doesn't include .exe
for Windows cross compilation
Produced binary is correct and works fine, but is not runnable, because Meson runs wine rusttest
instead of wine rusttest.exe
. (wine is exe_wrapper in this case)
The binary name is hardcoded here:
meson/mesonbuild/compilers/rust.py
Line 112 in d17df82
It should be using exiting code to generate proper temp file... like this from base class.
meson/mesonbuild/compilers/compilers.py
Lines 798 to 806 in d17df82
and even probably use this https://github.com/mesonbuild/meson/blob/d17df82efa5dd0b60b9b2a25f8a5e2f34477af6a/mesonbuild/compilers/compilers.py#L824C8-L824C10 instead of NIHing the process in rust.py.
You can use https://github.com/kasper93/meson-rust for example, there are github actions with both skip_sanity_check enabled and disabled.
To Reproduce
Try to cross compile Rust for --target x86_64-pc-windows-gnu
.
Expected behavior
Sanity check passes when binaries are correct.