diff options
| author | Nicholas Thompson <NCGThompson@gmail.com> | 2024-01-14 11:52:06 -0500 |
|---|---|---|
| committer | Nicholas Thompson <NCGThompson@gmail.com> | 2024-01-14 11:52:06 -0500 |
| commit | 52946377dc9dfbeb3c2ebc31f9263d308c0af2ab (patch) | |
| tree | 08f0343b827664cbf493fc2b9c4cfd9bf0816168 | |
| parent | 1a8e0c39fac364211a92ace4f872f6091518bd50 (diff) | |
| download | rust-52946377dc9dfbeb3c2ebc31f9263d308c0af2ab.tar.gz rust-52946377dc9dfbeb3c2ebc31f9263d308c0af2ab.zip | |
Honor $RUSTUP_HOME
| -rw-r--r-- | build_system/src/test.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/build_system/src/test.rs b/build_system/src/test.rs index 1577cbf2b53..dc1dc82736e 100644 --- a/build_system/src/test.rs +++ b/build_system/src/test.rs @@ -556,7 +556,7 @@ verbose-tests = true [build] cargo = "{cargo}" local-rebuild = true -rustc = "{home}/.rustup/toolchains/{toolchain}-{host_triple}/bin/rustc" +rustc = "{rustup_home}/toolchains/{toolchain}-{host_triple}/bin/rustc" [target.x86_64-unknown-linux-gnu] llvm-filecheck = "{llvm_filecheck}" @@ -565,7 +565,10 @@ llvm-filecheck = "{llvm_filecheck}" download-ci-llvm = false "#, cargo = cargo.trim(), - home = env.get("HOME").unwrap(), + rustup_home = match env.get("RUSTUP_HOME") { + Some(rustup_dir) => rustup_dir.clone(), + None => env.get("HOME").unwrap().to_owned() + "/.rustup", + }, toolchain = toolchain, host_triple = args.config_info.host_triple, llvm_filecheck = llvm_filecheck.trim(), |
