Skip to content

Commit 5294637

Browse files
committed
Honor $RUSTUP_HOME
1 parent 1a8e0c3 commit 5294637

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build_system/src/test.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ verbose-tests = true
556556
[build]
557557
cargo = "{cargo}"
558558
local-rebuild = true
559-
rustc = "{home}/.rustup/toolchains/{toolchain}-{host_triple}/bin/rustc"
559+
rustc = "{rustup_home}/toolchains/{toolchain}-{host_triple}/bin/rustc"
560560
561561
[target.x86_64-unknown-linux-gnu]
562562
llvm-filecheck = "{llvm_filecheck}"
@@ -565,7 +565,10 @@ llvm-filecheck = "{llvm_filecheck}"
565565
download-ci-llvm = false
566566
"#,
567567
cargo = cargo.trim(),
568-
home = env.get("HOME").unwrap(),
568+
rustup_home = match env.get("RUSTUP_HOME") {
569+
Some(rustup_dir) => rustup_dir.clone(),
570+
None => env.get("HOME").unwrap().to_owned() + "/.rustup",
571+
},
569572
toolchain = toolchain,
570573
host_triple = args.config_info.host_triple,
571574
llvm_filecheck = llvm_filecheck.trim(),

0 commit comments

Comments
 (0)