Open v-thakkar opened 6 years ago
Of course GNU version is more easily accessible now:
sekineh@sekineh-VirtualBox:~/rustme5$ arm-none-eabi-size --version
GNU size (2.26-4ubuntu1+8) 2.26
Library crates create .rlib
file which is not easy to analyze because of the lack of tooling.
In addition, they are essentially compressed form of LLVM bitcodes. Not suitable for binary size checking!
So we must use 1) binary crates or 2) custom main for binary size regression tests.
@sekineh you could also try building a staticlib
, which would create a standard .a
file. However, I am not sure how it behaves if you have not exposed the symbols (e.g. with #[no_mangle]
and/or pub extern
). It might be worth a check though :)
@jamesmunns
staticlib
might increase the visibility of codes in target arch.
In that case, we could edit Cargo.toml
using sed, etc.
The past regression:
The binary size of a program, compiled with opt-level=s, is tracked over time (per PR) and the CI fails if the binary size of the program regresses. The deadline for adding these tests is September 8, 2018.