Weihang Lo feb398a442
fix(build-std): determine root crates by target spec std:bool
In rust-lang/cargo#14183 Cargo starts bailing out if the `metadata.std`
field in a target spec JSON is set to `false`.
This is problematic because std for some targets are actually buildable
even they've declared as std-unsupported.

This patch removes the hard error, and instead determines the required
root crates by the `metadata.std` field. That is to say, if a target
is explicitly declared as `std: false`, `-Zbuild-std` will build `core`
and `compiler-builtins` only, no `std` will be built.

This patch doesn't change the behavior of `-Zbuild-std` with explicit
crates set. For example `-Zbuild-std=std` will force building `std`.

See Zulip discussion:
https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/help.20debugging.20a.20docs.2Ers.20issue.20with.20a.20new.20cargo.20error
2024-12-05 23:15:21 -05:00
..
2024-11-25 09:27:09 -06:00
2024-11-25 09:27:09 -06:00
2024-11-25 09:27:09 -06:00
2024-10-31 16:26:37 -05:00
2024-11-25 09:27:09 -06:00
2024-11-26 10:20:53 -05:00
2024-07-26 23:26:48 +08:00
2024-12-02 21:42:07 -05:00
2024-11-25 09:27:09 -06:00
2024-11-25 09:27:09 -06:00
2024-11-15 09:33:23 -06:00