]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #98798 - jyn514:download-rustc-cached, r=Mark-Simulacrum
authorMatthias Krüger <matthias.krueger@famsik.de>
Fri, 8 Jul 2022 06:00:39 +0000 (08:00 +0200)
committerGitHub <noreply@github.com>
Fri, 8 Jul 2022 06:00:39 +0000 (08:00 +0200)
commit6c6791a45831f2c15367fb96d09ea18f756d621e
tree7a0b9a8e8b14becef9a8d7d9cccfe31e63b1d06d
parent5dcd28cd1964969d605cddfcaec102006aa020c9
parent75dfd5e1c1a51c44c8eb8d7474879f6ae5969085
Rollup merge of #98798 - jyn514:download-rustc-cached, r=Mark-Simulacrum

Fix caching bug in `download-rustc = true`

When moving this to rustbuild, I introduced a bug: if you had the file already downloaded, but
deleted the sysroot for whatever reason, rustbuil would fail to unpack the cached tarball.

This only affects people if they have a cached tarball, which is probably why we haven't seen an issue yet -
wiping `build/cache` would work around the issue, or just not deleting `build/$TARGET/stage2`.

Fixes the following error:
```
thread 'main' panicked at 'fs::read_dir(&lib_dir) failed with No such file or directory (os error 2) ("/home/jnelson/rust-lang/rust2/build/x86_64-unknown-linux-gnu/ci-rustc/lib")', config.rs:1563:20
```

r? ``@Mark-Simulacrum``
src/bootstrap/builder.rs
src/bootstrap/config.rs