Skip to content

mupdf improvements#1832

Merged
Frenzie merged 6 commits into
koreader:masterfrom
benoit-pierre:pr/mupdf_improvements
Jun 22, 2024
Merged

mupdf improvements#1832
Frenzie merged 6 commits into
koreader:masterfrom
benoit-pierre:pr/mupdf_improvements

Conversation

@benoit-pierre

@benoit-pierre benoit-pierre commented Jun 21, 2024

Copy link
Copy Markdown
Member
  • only export what we need
  • build a static library, and fold it into wrap-mupdf
  • enable ICC profile support

To make sure all the required symbols are exported, the wrap-mupdf library is linked with some generated scripts using the symbols referenced in the corresponding FFI cdecl file (ffi-cdecl/mupdf_decl.c). This is the same technique I use on my meson branch to cut down the size of the monolibtic library build.

(The plan is to do the same with the k2pdfopt library and a static tesseract library).

Impact on code size (bss+data+text, release builds):

android-arm64 emulator kindlepw2
+79.6 KB +135.4 KB +122.6 KB

This change is Reviewable

To make it easier to change the list of included entries.
Will add a couple of generated linker scripts to the target link flags;
generated by `utils/gen_linker_exports.sh` to limit exported symbols to
those used in the specified FFI cdecls.
@benoit-pierre benoit-pierre force-pushed the pr/mupdf_improvements branch from e37166d to ce43639 Compare June 21, 2024 22:55
Comment thread thirdparty/mupdf/CMakeLists.txt Outdated
@benoit-pierre benoit-pierre force-pushed the pr/mupdf_improvements branch from ce43639 to ab1e56f Compare June 22, 2024 06:45
@Frenzie Frenzie merged commit 00340bd into koreader:master Jun 22, 2024
@benoit-pierre benoit-pierre deleted the pr/mupdf_improvements branch June 22, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants