Skip to content

Commit f3a47cc

Browse files
committed
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.lhy31512.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.
1 parent eb0a624 commit f3a47cc

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/bootstrap/check.rs

-4
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,6 @@ macro_rules! tool_check_step {
341341
true,
342342
);
343343

344-
let libdir = builder.sysroot_libdir(compiler, target);
345-
let hostdir = builder.sysroot_libdir(compiler, compiler.host);
346-
add_to_sysroot(&builder, &libdir, &hostdir, &stamp(builder, compiler, target));
347-
348344
/// Cargo's output path in a given stage, compiled by a particular
349345
/// compiler for the specified target.
350346
fn stamp(

0 commit comments

Comments
 (0)