diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2024-09-14 11:53:11 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-14 11:53:11 +1000 |
| commit | 2bf0dd2735d0165a95036594f5f900a12217f6a0 (patch) | |
| tree | 2cb76432232ae104195dc7281989fc47c0b7b197 /src/bootstrap | |
| parent | 507c05bead4026ed8841512095b4218119eb479f (diff) | |
| parent | a21f39522c8d5776f5baa6ead22c1dbb13e56820 (diff) | |
| download | rust-2bf0dd2735d0165a95036594f5f900a12217f6a0.tar.gz rust-2bf0dd2735d0165a95036594f5f900a12217f6a0.zip | |
Rollup merge of #130138 - Zalathar:initial-libdir, r=albertlarsan68
bootstrap: Print more debug info when `find_initial_libdir` fails From looking at the failure messages printed by #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 #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.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/lib.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index 780024e307e..fa295dea1f6 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -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")) |
