Testing rust maturity on thumbv8m.main-none-eabi target

How mature is thumbv8m.main-none-eabi target?
How likely is it that I build my Rust project on one of those target and encounter some subtle LLVM bug (eg., a bug that just produces wrong results and does not cause runtime error).
Could anyone pass me a pointer on how to do some exhaustive test using some testsuites on those targets?

It works well for me, and I have never run into weird subtle bugs from it.

1 Like


I found the ci scripts for testing some other targets and tried to run python3 ../x.py test library/std --stage 2 --host='' --target thumbv8m.main-none-eabi

thumbv8m.main is not listed in ARCH_TABLE in src/tools/compiletest/src/util.rs so I added thumbv8m.main there.

After that the test fails like this:

error[E0463]: can't find crate for `std`
 --> /home/shin/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.1.14/src/error_impls.rs:8:1
8 | extern crate std;
  | ^^^^^^^^^^^^^^^^^ can't find crate
  = note: the `thumbv8m.main-none-eabi` target may not be installed

But rustup target add thumbv8m.main-none-eabi says the target is already up to date.

What could I be missing here?

Because only no_std development is officially supported on thumbv8m.main-none-eabi platform.

Oh, okay. That means I cannot run any test that uses std crate.

But there must be some kind of test the Rust team uses for the target, isn't there?
Although apparently automated test is not set up for Tier 2 targets.

Or maybe target test is not so much important since rustc is just a frontend?

I believe you can build the stdlib from source for such platforms. Haven't done it myself, but maybe it's xargo?

thumbv8m.main-none-eabi by definition is a target without OS support (the none part). libstd is the interface to the OS, so it can't ever work on thumbv8m.main-none-eabi. If you run your programs on a certain OS then you should use the target triple for that OS.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.