Skip to content
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

rustbuild: Fix copying duplicate crates into the sysroot #42263

Merged
merged 1 commit into from
Jun 1, 2017

Commits on May 30, 2017

  1. 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 rust-lang#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 rust-lang#42261
    alexcrichton committed May 30, 2017
    Configuration menu
    Copy the full SHA
    2dab1e2 View commit details
    Browse the repository at this point in the history