I'm trying to experiment with rust and some embedded code. Currently I have
to do a three-pass compilation:
rustc --target arm-linux-eabi -O --emit bc main.rs -o main.bc
llc -mtriple arm-none-eabi -march=thumb -mcpu=cortex-m0 main.bc -o main.s
arm-none-linux-gnueabi-as main.s -o main.o
First, I'm not sure how relevant is --target flag for rustc. I seems to
change target datalayout/triple in generated bc, but that should be
overriden by llc -mtriple anyway, right?
Second, I can pass -Ctarget-cpu=cortex-m0, but I cannot pass down
-march=thumb, tried this way: -Cllvm-args='--march=thumb', failed with
"rustc: Unknown command line argument '--march=thumb'".
Any hints on how can I drop explicit llc and as steps here?
Vladimir "Farcaller" Pouzanov
Rust-dev mailing list