Skip to content

Commit

Permalink
harfbuzz: don't compile support for unused APIs
Browse files Browse the repository at this point in the history
Example code size reduction for release builds:
- `android-arm64`: -78.7 KB
- `emu-x86_64`: -149.5 KB
- `kindlepw2`: -94.2 KB
  • Loading branch information
benoit-pierre committed Jan 12, 2025
1 parent b5f4410 commit be1cb71
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion thirdparty/harfbuzz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,18 @@ list(APPEND CFG_CMD COMMAND
${SOURCE_DIR}
)

set(DEFINES)
set(DEFINES
HB_DISABLE_DEPRECATED
HB_NO_BUFFER_MESSAGE
HB_NO_BUFFER_SERIALIZE
HB_NO_COLOR
HB_NO_LAYOUT_COLLECT_GLYPHS
HB_NO_LAYOUT_RARELY_USED
HB_NO_LAYOUT_UNUSED
HB_NO_META
HB_NO_PAINT
HB_NO_STYLE
)

# We've apparently hit a weird corner-case w/ XText where GCC/STL atomics *sometimes* horribly blow up on an ARM1136JF-S CPU w/ GCC 7.5 & up...
# c.f., https://github.com/koreader/koreader/issues/5780 & https://github.com/koreader/koreader/issues/6024
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/kpvcrlib/crengine

0 comments on commit be1cb71

Please sign in to comment.