Skip to content
Prev Previous commit
Next Next commit
Don't copy tool dependencies to the sysroot
This fixes the following error:

```
error: found crates (`serde_derive` and `serde_derive`) with colliding StableCrateId values.
   --> /home/joshua/.local/lib/cargo/registry/src/github.amrom.workers.dev-1ecc6299db9ec823/cargo_metadata-0.8.2/src/lib.rs:162:1
    |
162 | extern crate serde_derive;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
```

This is a bug in resolve (rust-lang#56935)
but it will be difficult to fix in the near future. This works around it
in the meantime by not copying serde_derive and other dependencies to
the sysroot when they're built for other tools. This rebuilds the
dependencies slightly more often than necessary, but avoids the crate
conflicts.

This can be reverted once rust-lang#56935 is fixed.
  • Loading branch information
jyn514 committed May 5, 2021
commit f3a47cc6ac68467fef0f4cba175960261234bf4b
4 changes: 0 additions & 4 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,6 @@ macro_rules! tool_check_step {
true,
);

let libdir = builder.sysroot_libdir(compiler, target);
let hostdir = builder.sysroot_libdir(compiler, compiler.host);
add_to_sysroot(&builder, &libdir, &hostdir, &stamp(builder, compiler, target));

/// Cargo's output path in a given stage, compiled by a particular
/// compiler for the specified target.
fn stamp(
Expand Down