bootstrap: Print more debug info when find_initial_libdir fails

This commit is contained in:
Zalathar 2024-09-09 17:40:25 +10:00
parent 304b7f801b
commit a21f39522c

View file

@ -347,10 +347,14 @@ impl Build {
};
let Some(initial_libdir) = find_initial_libdir() else {
panic!(
"couldn't determine `initial_libdir` \
from target dir {initial_target_dir:?} \
and sysroot {initial_sysroot:?}"
)
"couldn't determine `initial_libdir`:
- config.initial_rustc: {rustc:?}
- initial_target_libdir_str: {initial_target_libdir_str:?}
- initial_target_dir: {initial_target_dir:?}
- initial_sysroot: {initial_sysroot:?}
",
rustc = config.initial_rustc,
);
};
let version = std::fs::read_to_string(src.join("src").join("version"))