mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-05-01 05:14:56 +00:00
Enable the following optimizations when building runtime-rs in release mode: - lto: true - codegen-units=1: Setting these reduce the binary size and improve performance at the cost of longer build times. Without these flags: - build time: 4m 55s - binary size: 51 MB With these flags: - build time: 7m 21s - binary size: 38MB Per https://github.com/kata-containers/kata-containers/issues/1125 and local experiments, a smaller binary size leads to a smaller shim memory footprint. - https://nnethercote.github.io/perf-book/build-configuration.html#codegen-units - https://nnethercote.github.io/perf-book/build-configuration.html#link-time-optimization Signed-off-by: Saul Paredes <saulparedes@microsoft.com>