Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit d72f710

Browse files
committed
Update steps to testing rustc changes for upstream changes
1 parent 5ae94e9 commit d72f710

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

Readme.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,14 @@ You need to do this steps to successfully compile and use the cranelift backend
6060
2. Run `python x.py setup` and choose option for compiler (`b`).
6161
3. Build compiler and necessary tools: `python x.py build --stage=2 compiler library/std src/tools/rustdoc src/tools/rustfmt`
6262
* (Optional) You can also build cargo by adding `src/tools/cargo` to previous command.
63-
4. Copy exectutable files from `./build/host/stage2-tools/<your hostname triple>/release`
64-
to `./build/host/stage2/bin/`. Note that you would need to do this every time you rebuilt `rust` repository.
65-
5. Copy cargo from another toolchain: `cp $(rustup which cargo) .build/<your hostname triple>/stage2/bin/cargo`
66-
* Another option is to build it at step 3 and copy with other executables at step 4.
67-
6. Link your new `rustc` to toolchain: `rustup toolchain link stage2 ./build/host/stage2/`.
68-
7. (Windows only) compile the build system: `rustc +stage2 -O build_system/main.rs -o y.exe`.
69-
8. You need to prefix every `./y.sh` (or `y` if you built `build_system/main.rs` as `y`) command by `rustup run stage2` to make cg_clif use your local changes in rustc.
70-
63+
4. Copy cargo from a nightly toolchain: `cp $(rustup +nightly which cargo) ./build/host/stage2/bin/cargo`. Note that you would need to do this every time you rebuilt `rust` repository.
64+
5. Link your new `rustc` to toolchain: `rustup toolchain link stage2 ./build/host/stage2/`.
65+
6. (Windows only) compile the build system: `rustc +stage2 -O build_system/main.rs -o y.exe`.
66+
7. You need to prefix every `./y.sh` (or `y` if you built `build_system/main.rs` as `y`) command by `rustup run stage2` to make cg_clif use your local changes in rustc.
7167
* `rustup run stage2 ./y.sh prepare`
7268
* `rustup run stage2 ./y.sh build`
7369
* (Optional) run tests: `rustup run stage2 ./y.sh test`
74-
9. Now you can use your cg_clif build to compile other Rust programs, e.g. you can open any Rust crate and run commands like `$RustCheckoutDir/compiler/rustc_codegen_cranelift/dist/cargo-clif build --release`.
70+
8. Now you can use your cg_clif build to compile other Rust programs, e.g. you can open any Rust crate and run commands like `$RustCheckoutDir/compiler/rustc_codegen_cranelift/dist/cargo-clif build --release`.
7571

7672
## Configuration
7773

0 commit comments

Comments
 (0)