diff options
author | Florent Valette <florent.valette@ledger.fr> | 2024-07-30 11:36:50 +0200 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2024-09-24 14:56:01 -0700 |
commit | 1aac6cc1ec380a14519822d1a2bdf3e5850de68b (patch) | |
tree | 8f0c797c96c2b00b5e9ad28dc24327be9e24c9fb /manual tests/1 wrap | |
parent | 8eaeff5b1f3057f827dfc95ac3987903c9bcb828 (diff) | |
download | meson-master.zip meson-master.tar.gz meson-master.tar.bz2 |
Sanity check for bare metal rust wasn't working for a while and there is a pending PR (#12175).
To workaround this problem, we used to let sanity check for build machine and manually defined
rustc target.
Commit 18f8aeda8b59a132f24fa1af800ff65cac2f61f4 breaks this workaround as, even without an
exe_wrapper, native_static_libs are appends as internal deps.
This behaviour makes sense for cross compiled rust in a rich environment but not any for
no-std rust. As said in comments, one can't tell if the code is no-std or not because this is
an annotation from sources. From our point of view, it is pretty clear that building a no-std
rust target means that one has to define system='bare metal' and kernel='none' in his cross-file.
According to that, sanity_check for rust compiler is modified to handle kernel == 'none' case
by building a specific no-std rust snippet, with an extra args if rust_ld is ls.bfd (in order
to prevent the linker to link with a potentially non existing startfile for the given target).
'native_static_libs' is also leave empty in that very case.
This commit fix the spurious native static libs for no-std case and allow us to remove
our dirty workaround which by-passed non working sanity check for bare metal rust.
One who wants to use meson for baremetal Rust project only have to define the rust target
in their cross file.
e.g.
rust = ['rustc', '--target', '<rustc valid target>']
Diffstat (limited to 'manual tests/1 wrap')
0 files changed, 0 insertions, 0 deletions