Skip to content

Commit e2f50c2

Browse files
authored
Unrolled build for rust-lang#130138
Rollup merge of rust-lang#130138 - Zalathar:initial-libdir, r=albertlarsan68 bootstrap: Print more debug info when `find_initial_libdir` fails From looking at the failure messages printed by rust-lang#129775, my hypothesis is that `rustc --print=sysroot` sometimes prints the wrong path when the rustc executable is hardlinked in multiple places, at least on my macOS system. However, currently I don't have any concrete evidence of this actually happening. This PR therefore expands on rust-lang#129775 by printing even more information on failure (including the actual rustc path), in the hope that when the failure next occurs we can confirm or reject the hypothesis that `rustc --print=sysroot` is printing the wrong path.
2 parents 23b04c0 + a21f395 commit e2f50c2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/bootstrap/src/lib.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,14 @@ impl Build {
349349
};
350350
let Some(initial_libdir) = find_initial_libdir() else {
351351
panic!(
352-
"couldn't determine `initial_libdir` \
353-
from target dir {initial_target_dir:?} \
354-
and sysroot {initial_sysroot:?}"
355-
)
352+
"couldn't determine `initial_libdir`:
353+
- config.initial_rustc: {rustc:?}
354+
- initial_target_libdir_str: {initial_target_libdir_str:?}
355+
- initial_target_dir: {initial_target_dir:?}
356+
- initial_sysroot: {initial_sysroot:?}
357+
",
358+
rustc = config.initial_rustc,
359+
);
356360
};
357361

358362
let version = std::fs::read_to_string(src.join("src").join("version"))

0 commit comments

Comments
 (0)