The ctor is not run, but, interesting point, there is the same problem
on Linux :)
Can you please confirm with a clean build this work on your machine with
this v3, and report exact configure and run commands you use?
Thanks,
Pierrick
On 6/29/24 01:06, Manos Pitsidianakis wrote:
On Fri, 28 Jun 2024 22:12, Pierrick Bouvier <pierrick.bouv...@linaro.org> wrote:
I've been able to build rust device on windows, with a few tweaks
needed.
- specificy the target for libclang (used by bindgen), which targets
MSVC by default (so different set of headers)
- additional headers (libclang searches its own header with a relative
path instead of absolute)
- additional windows libs that must be linked in final executable
However, even tough I can build the executable, I get this error:
$ ./build/qemu-system-aarch64 -M virt
C:\w\qemu\build\qemu-system-aarch64.exe: unknown type 'x-pl011-rust'
Any idea of what could be missing here?
Sounds like either the rust lib is not linked to the final binary (which
you can confirm if you look at the included symbols and don't see
anything with rust origin) or the constructor decorated with
#[cfg_attr(target_os = "windows", link_section = ".CRT$XCU"] is not
linked properly (you can add a puts() and see if it's invoked or add a
breakpoint in gdb)