I’m trying to add an architecture to rustc (namely, Windows UWP platform) and am having trouble with it.
Full disclosure, I’m extremely new to rust, its tools, so I might be missing something rather obvious.
I added my platform description in
src/librustc_target/spec/, and am able to build everything (using
./x.py build up to the point where
/build/x86_64-unknown-linux-gnu/stage2/bin/rustc --print target-list shows my target.
However, when I try to build a basic hello world target, here’s the output:
chouquette@nibbler ./build/x86_64-unknown-linux-gnu/stage2/bin/rustc --target=i686-pc-uwp-gnu /tmp/test.rs ~/dev/rust error[E0463]: can't find crate for `std` | = note: the `i686-pc-uwp-gnu` target may not be installed error: aborting due to previous error
I tried to explicitely build std/libstd using
./x.py build src/libstd, which succeeds, but then running rustc outputs:
error: couldn't load codegen backend "/home/chouquette/dev/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so": "librustc_codegen_ssa-ae35f6596ec04cfb.so: cannot open shared object file: No such file or directory"
This is fixed by re-running
./x.py build, but then it gets me the “can’t find std crate” error.
To put it mildly, I feel very lost Any help would be highly appreciated!
What I’m aiming at is to be able to build a small shared library for this specific target. Once I can just edit the target file to adjust linkage for that platform, I’ll be happy
Thanks a lot in advance!