afd4b81c86
rustbuild: Fix copying duplicate crates into the sysroot After compiling a project (e.g. libstd, libtest, or librustc) rustbuild needs to copy over all artifacts into the sysroot of the compiler it's assembling. Unfortunately rustbuild doesn't know precisely what files to copy! Today it has a heuristic where it just looks at the most recent version of all files that look like rlibs/dylibs and copies those over. This unfortunately leads to bugs with different versions of the same crate as seen in #42261. This commit updates rustbuild's strategy of copying artifacts to work off the list of artifacts produced by `cargo build --message-format=json`. The build system will now parse json messages coming out of Cargo to watch for files being generated, and then it'll only copy over those precise files. Note that there's still a bit of weird logic where Cargo prints that it's creating `libstd.rlib` where we actually want `libstd-xxxxx.rlib`, so we still do a bit of "most recent file" probing for those. This commit should take care of the crates.io dependency issues, however, as they're all copied over precisely. Closes #42261 |
||
---|---|---|
.. | ||
bootstrap | ||
build_helper | ||
ci | ||
compiler-rt@c8a8767c56 | ||
doc | ||
driver | ||
etc | ||
grammar | ||
jemalloc@3288e0659c | ||
liballoc | ||
liballoc_jemalloc | ||
liballoc_system | ||
libarena | ||
libbacktrace | ||
libcollections | ||
libcompiler_builtins | ||
libcore | ||
libflate | ||
libfmt_macros | ||
libgetopts | ||
libgraphviz | ||
liblibc@03562b0cb2 | ||
libpanic_abort | ||
libpanic_unwind | ||
libproc_macro | ||
libproc_macro_plugin | ||
librand | ||
librustc | ||
librustc_asan | ||
librustc_back | ||
librustc_bitflags | ||
librustc_borrowck | ||
librustc_const_eval | ||
librustc_const_math | ||
librustc_data_structures | ||
librustc_driver | ||
librustc_errors | ||
librustc_incremental | ||
librustc_lint | ||
librustc_llvm | ||
librustc_lsan | ||
librustc_metadata | ||
librustc_mir | ||
librustc_msan | ||
librustc_passes | ||
librustc_platform_intrinsics | ||
librustc_plugin | ||
librustc_privacy | ||
librustc_resolve | ||
librustc_save_analysis | ||
librustc_trans | ||
librustc_tsan | ||
librustc_typeck | ||
librustdoc | ||
libserialize | ||
libstd | ||
libstd_unicode | ||
libsyntax | ||
libsyntax_ext | ||
libsyntax_pos | ||
libterm | ||
libtest | ||
libunwind | ||
llvm@1ef3b9128e | ||
rt | ||
rtstartup | ||
rustc | ||
rustllvm | ||
test | ||
tools | ||
Cargo.lock | ||
Cargo.toml | ||
stage0.txt |