File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,22 @@ You can also use `--keep-stage 1` when running tests. Something like this:
87
87
- Initial test run: ` ./x.py test -i --stage 1 src/test/ui `
88
88
- Subsequent test run: ` ./x.py test -i --stage 1 src/test/ui --keep-stage 1 `
89
89
90
+ ## Fine-tuning optimizations
91
+
92
+ Setting ` optimize = false ` makes the compiler too slow for tests. However, to
93
+ improve the test cycle, you can disable optimizations selectively only for the
94
+ crates you'll have to rebuild
95
+ ([ source] ( https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/incremental.20compilation.20question/near/202712165 ) ).
96
+ For example, when working on ` rustc_mir_build ` , the ` rustc_mir_build ` and
97
+ ` rustc_driver ` crates take the most time to incrementally rebuild. You could
98
+ therefore set the following in the root ` Cargo.toml ` :
99
+ ``` toml
100
+ [profile .release .package .rustc_mir_build ]
101
+ opt-level = 0
102
+ [profile .release .package .rustc_driver ]
103
+ opt-level = 0
104
+ ```
105
+
90
106
## Working on multiple branches at the same time
91
107
92
108
Working on multiple branches in parallel can be a little annoying, since
You can’t perform that action at this time.
0 commit comments