Skip to content

Commit 615d5b9

Browse files
committed
chore(ci): pass -Ccodegen-units=1 -Copt-level=z when compiling for size reports
Turns out `-Copt-level=z` is quite effective for this test suite. A local test result with `--target qemu_mps2_an385` is shown below. Before: | Name | `.text` | `.data` | `.bss` | |-------|---------|---------|--------| | (Min) | 3696 | 16 | 96 | | (Max) | 13920 | 220 | 12408 | After: | Name | `.text` | `.data` | `.bss` | |-------|---------|---------|--------| | (Min) | 3356 | 16 | 96 | | (Max) | 8940 | 220 | 12408 |
1 parent c0299a3 commit 615d5b9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/report-size.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ jobs:
5050
path: ./target/debug
5151
key: ${{ runner.os }}-ci-runner-${{ hashFiles('rust-toolchain', 'src/r3_test_runner/**', 'src/r3_test_suite/**') }}
5252

53-
- name: Enable LTO
53+
- name: "Set -Clto -Ccodegen-units=1 -Copt-level=z"
5454
run: |
55-
echo "lto = true" >> Cargo.toml
55+
echo 'lto = true' >> Cargo.toml
56+
echo 'codegen-units = 1' >> Cargo.toml
57+
echo 'opt-level = "z"' >> Cargo.toml
5658
5759
- name: Generate a size report
5860
run: |

0 commit comments

Comments
 (0)