-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libstd: -Z build-std is now broken for Cortex-M targets #98378
Comments
I think this might be a duplicate of #98293? |
seems related. they seem to be using |
The cause in my case (UEFI) seems to be that building |
submitted a fix in PR #98457 (not sure it's the right fix however) |
fixes #55 `-Z build-std` builds a "no op" std for the target, even no-std ones that won't work for ARMv6-M because std depends on CAS and that target lacks CAS ARMv7-M also has problems with recent nightlies due to rust-lang/rust#98378 this commit changes the logic to use a smaller `-Z build-std=alloc` subset for no-std targets targets are considered 'no-std' when `rustc --print=cfg --target $T` reports `target_os="none"`
Any update on this? I'm seeing the same issue with |
Steps to reproduce
Expected this to work with a recent nightly but it didn't.
The most recent PR that touched code related to those lines is #97791.
Retrying the above steps with an older nightly (
nightly-2022-06-18
) before #97791 was merged works fine.I find a bit odd that
-Z build-std
re-compiles libstd for a no-std target; I presume it's recompiling it to recompile proc_macro for the host. (?)What's more strange is that using
--target=$HOST
works fine withnightly-2022-06-22
.So I'm not sure why libstd fails to compile for the host with
-Z build-std --target=thumbv7m-none-eabi
but not with-Z build-std --target=$HOST
Meta
Workaround
Using
-Z build-std=core
(or=alloc
) withthumbv7m-none-eabi
compiles fine.The text was updated successfully, but these errors were encountered: