about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-05-27 10:19:43 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-05-30 08:11:42 -0700
commit2dab1e21509c4ffa8f1ea93d4a70c5a33cc6fe1d (patch)
tree92e4bf99ff9c9aad98c12b76822b5345d5cce17f /src/rustllvm/RustWrapper.cpp
parent2f278c57ff4a805941f1497f34b3ad20b6f8e13b (diff)
downloadrust-2dab1e21509c4ffa8f1ea93d4a70c5a33cc6fe1d.tar.gz
rust-2dab1e21509c4ffa8f1ea93d4a70c5a33cc6fe1d.zip
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 craet 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
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions