Skip to content

Commit b349437

Browse files
jyn514calebcartwright
authored andcommitted
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/jiasu.xzqcsaa.nyc.mn-1ecc6299db9ec823/cargo_metadata-0.8.2/src/lib.rs:162:1 | 162 | extern crate serde_derive; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` This is a bug in resolve (#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 #56935 is fixed.
1 parent 956e0ba commit b349437

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/bootstrap/check.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,6 @@ macro_rules! tool_check_step {
342342
true,
343343
);
344344

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

0 commit comments

Comments
 (0)