Build reproducibility issue: libmuxcom.so produces different function ordering with -flto=auto, causing UI performance regression

Description:

When building from the same source and commit, the resulting binaries differ from the official build. The toolchain used was the ysheng26 SDK, as it was the closest match to the official build. The Knulli toolchain was ruled out because its GCC version (12.3.0) does not match the version string found in the official binaries (GCC 13.2.0, Buildroot -g902e4ab60e-dirty).

Affected files: libmuxcom.so, libui.so, liblookup.so, muxfrontend

Note: All four files differ from the official build, but only libmuxcom.so causes a functional issue due to different function ordering affecting cache locality and UI performance.

Observed differences in libmuxcom.so:

  • File size difference: 944KB (self-built) vs 940KB (official)
  • Function ordering differs due to LTO (-flto=auto) producing different results
  • Key rendering functions such as display_composite_frame and display_flush are placed much further apart in memory (18KB gap vs 784 bytes in official build), likely causing cache locality issues
  • This results in noticeable UI scroll performance regression on device

Steps to reproduce:

  1. Clone frontend repo at commit e57abbb
  2. Build with ysheng26 SDK using ./xtool.sh make DEVICE=ARM64_A53
  3. Replace libmuxcom.so on device
  4. Observe scroll performance degradation

Expected: Build output matches official build performance

Actual: UI scrolling is noticeably slower

Note: Both the official build and self-built binaries report identical toolchain version strings (GCC 13.2.0, Buildroot -g902e4ab60e-dirty). However, the resulting binaries differ in size and function ordering, which suggests the official build may be using an internally modified toolchain that is not publicly available. Could you clarify whether the official toolchain differs from the publicly available ysheng26 SDK?

I’m not quite sure what you are currently achieving? You will find that quite a lot has changed with that commit pertaining to TTF implementation. I would suggest waiting for the Andromeda release for any personal changes you are currently doing.