Skip to content

Commit feeb184

Browse files
committed
Normalize bootstrap_out path, r=clubby789
1 parent d3555f3 commit feeb184

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bootstrap/src/lib.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,16 @@ impl Build {
370370
.expect("failed to read src/version");
371371
let version = version.trim();
372372

373-
let bootstrap_out = std::env::current_exe()
373+
let mut bootstrap_out = std::env::current_exe()
374374
.expect("could not determine path to running process")
375375
.parent()
376376
.unwrap()
377377
.to_path_buf();
378+
// Since bootstrap is hardlink to deps/bootstrap-*, Solaris can sometimes give
379+
// path with deps/ which is bad and needs to be avoided.
380+
if bootstrap_out.ends_with("deps") {
381+
bootstrap_out.pop();
382+
}
378383
if !bootstrap_out.join(exe("rustc", config.build)).exists() && !cfg!(test) {
379384
// this restriction can be lifted whenever https://github.com/rust-lang/rfcs/pull/3028 is implemented
380385
panic!(

0 commit comments

Comments
 (0)