mirror of
https://git.yoctoproject.org/poky
synced 2026-03-16 20:29:41 +01:00
Upstream explicitly say in their CONFIG.md file to build with -Os: Make sure you build with your compiler's "optimize for size" option. On `gcc` this is `-Os` [ ... ] HarfBuzz heavily uses inline functions and the optimize-size flag can make the library smaller by 20% or more. Moreover, sometimes, based on the target CPU, the optimize-size builds perform *faster* as well, thanks to lower code footprint and caching effects Drop the patch to build just hb-subset-plan-layout.cc with -Os (which was a workaround for a GCC bug), and pass -Os globally. This manages to reduce the duration to harfbuzz:do_compile on my machine from 75s to 47s, and has a big impact on the library sizes: harfbuzz: PKGSIZE changed from 1769358 to 1237070 (-30%) harfbuzz-dbg: PKGSIZE changed from 84920168 to 71203208 (-16%) harfbuzz-subset: PKGSIZE changed from 1579247 to 940191 (-40%) (From OE-Core rev: d795b3e16ed01d7273d4f3779684eb41cc16f809) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>