Build rust from source for ARM on Windows

Is there any document for how to build rust on Windows for a target like arm-linux? I know there is instructions for how to build rust on Windows for Windows:

Thanks, Baoshan

Right now the problem I am seeing is this in building compiler_builtins:

running: “vx-cxx” “-O2” “-ffunction-sections” “-fdata-sections” “-fPIC” “-ffunction-sections” “-fdata-sections” “-fPIC” “-fno-builtin” “-fvisibility=hidden” “-ffreestanding” “-DVISIBILITY_HIDDEN” “-o” “C:\msys64\home\bpang\vx_rust\rust\build\x86_64-pc-windows-gnu\stage1-std\arm-wrs-vxworks\release\build\compiler_builtins-1e786781ebc1dc64\out\.\compiler-rt/lib/builtins\absvdi2.o” “-c” “.\compiler-rt/lib/builtins\absvdi2.c”

Internal error occurred: Failed to find tool.Is vx-cxx installed?

The ‘vx-cxx’ is installed and PATH has been set to find it. I also can run the command mannually without any problem. I suspect the spawn() function can’t handle “vx-cxx” for some mysterious reason.

Any idea how to debug the problem as I can’t see any problem when manully run the command?

I think the problem is on Windows “Command::new” only can run windows application no matter where you invoke the rust program, “vx-cxx” is a shell script.

To make vx-cxx run with “Command::new”, I need to write the code like this:

let out = Command::new(“bash”).arg(“vx-cxx”).arg("-v").output().unwrap();

Not exactly what you’re looking for, but the Discovery Book shows how to target bare-metal ARM from Windows (or Linux/macOS).