Skip to content

Commit 661f42a

Browse files
committed
Auto merge of #62497 - o01eg:fix-62496, r=<try>
Fix double resolving custom libdir Fixes #62496 Related issue is https://bugs.gentoo.org/672816
2 parents 5d8ffb5 + c1aa2a4 commit 661f42a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/bootstrap/dist.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -485,16 +485,19 @@ impl Step for Rustc {
485485
let name = entry.file_name();
486486
if let Some(s) = name.to_str() {
487487
if is_dylib(s) {
488-
builder.install(&entry.path(), &image.join(&libdir_relative), 0o644);
488+
// Don't use custom libdir here because ^lib/ will be resolved again
489+
// with installer
490+
builder.install(&entry.path(), &image.join("lib"), 0o644);
489491
}
490492
}
491493
}
492494
}
493495

494496
// Copy over the codegen backends
495497
let backends_src = builder.sysroot_codegen_backends(compiler);
496-
let backends_rel = backends_src.strip_prefix(&src).unwrap();
497-
let backends_dst = image.join(&backends_rel);
498+
let backends_rel = backends_src.strip_prefix(&libdir).unwrap();
499+
// Don't use custom libdir here because ^lib/ will be resolved again with installer
500+
let backends_dst = image.join("lib").join(&backends_rel);
498501
t!(fs::create_dir_all(&backends_dst));
499502
builder.cp_r(&backends_src, &backends_dst);
500503

0 commit comments

Comments
 (0)