Commit 9200fbe
committed
also enable optimizations in the
Cargo doc says:
> Note that when using the cargo test and cargo bench commands, the test/bench profiles only apply to the final test executable. Dependencies will continue to use the dev/release profiles.
So with the current settings, `cargo test` optimizes all dependencies but not the top level
crate (e.g. `test/foo.rs`)
This commit adds optimizations to the last `rustc` invocation of `cargo test`. This results in a 6%
reduction in binary size when doing `cargo test` on our sample test file.test profile1 parent 19ec8c4 commit 9200fbe
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
| |||
0 commit comments