@@ -342,11 +342,17 @@ since August 2019 ([wg-cargo-std-aware#10]/[cargo#7216]).
342342re-builds the standard library crates which rustc then uses instead of the
343343pre-built standard library from the sysroot.
344344
345- ` -Zbuild-std ` builds ` std ` by default. ` test ` is also built if ` std ` is being
346- built and tests are being run with the default harness. Optionally, users can
347- provide the list of crates to be built, though this was intended as an escape
348- hatch to work around bugs - the arguments to the flag are unstable since the
349- names of crates comprising the standard library are not stable.
345+ Originally, ` -Zbuild-std ` always build ` std ` by default. Since the addition of
346+ the ` std ` field to target metadata in [ rust #122305 ] , Cargo only builds ` std ` by
347+ default if ` metadata.std ` is true.
348+
349+ ` test ` is also built if ` std ` is being built and tests are being run with the
350+ default harness.
351+
352+ Optionally, users can provide the list of crates to be built, though this was
353+ intended as an escape hatch to work around bugs - the arguments to the flag are
354+ unstable since the names of crates comprising the standard library are not
355+ stable.
350356
351357Cargo has a hardcoded list of what dependencies need to be added for a given
352358user-requested crate (i.e. ` std ` implies building ` core ` , ` alloc ` ,
@@ -479,6 +485,7 @@ features that are related or would be beneficial for build-std:
479485[ rfcs#1133 ] : https://github.com/rust-lang/rfcs/pull/1133
480486[ rfcs#2663 ] : https://github.com/rust-lang/rfcs/pull/2663
481487[ rfcs#3516 ] : https://rust-lang.github.io/rfcs/3516-public-private-dependencies.html
488+ [ rust#122305 ] : https://github.com/rust-lang/rust/pull/128534
482489[ rust#128534 ] : https://github.com/rust-lang/rust/pull/128534
483490[ rust#67074 ] : https://github.com/rust-lang/rust/issues/67074
484491[ wg-cargo-std-aware#10 ] : https://github.com/rust-lang/wg-cargo-std-aware/issues/10
0 commit comments