Skip to content

Commit e173b71

Browse files
committed
You don't need y.sh prepare to build, only to test
Also improve the error message when trying to test without having run y.sh prepare first.
1 parent 4698eb6 commit e173b71

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ If you want to build the backend manually, you can download it from GitHub and b
4949
```bash
5050
$ git clone https://github.com/rust-lang/rustc_codegen_cranelift
5151
$ cd rustc_codegen_cranelift
52-
$ ./y.sh prepare
5352
$ ./y.sh build
5453
```
5554

5655
To run the test suite replace the last command with:
5756

5857
```bash
58+
$ ./y.sh prepare # only needs to be run the first time
5959
$ ./test.sh
6060
```
6161

build_system/prepare.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ impl GitRepo {
9191

9292
fn verify_checksum(&self, dirs: &Dirs) {
9393
let download_dir = self.download_dir(dirs);
94+
if !download_dir.exists() {
95+
eprintln!(
96+
"Missing directory {download_dir}: Please run ./y.sh prepare to download.",
97+
download_dir = download_dir.display(),
98+
);
99+
std::process::exit(1);
100+
}
94101
let actual_hash = format!("{:016x}", hash_dir(&download_dir));
95102
if actual_hash != self.content_hash {
96103
eprintln!(

0 commit comments

Comments
 (0)