-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compile a static crengine library #1676
compile a static crengine library #1676
Conversation
3c62d2c
to
470683e
Compare
WTF: |
470683e
to
11382fc
Compare
There's only one user `libkoreader-cre.so`.
Set it to `inlineshidden`, since we compile a static library and don't need to export symbols (all accesses go through `libkoreader-cre.so`).
11382fc
to
be9d658
Compare
Does not work for some reason (double free pointer crash in the emulator). Some difference in the flags used to compile |
I don't usually have troubles with LTO builds, FWIW, but it's been a while since I last tried ;). I'll fire one up to see how it fares... |
LTO is not the issue, a standard release build fails. |
The release build issue is because of using The release build with a static library does work for some reason. Moving more compilation flags (pretty much all of them) out of Will clean up and revisit later. |
Ah, can't re-open after force pushing… |
There's only one user:
libkoreader-cre.so
, compiling a static library helps reduce code size and improve performance (I have not benchmarked it again, but FWIR, it was about 10% faster). Additionally, change the default symbol visibility toinlinehidden
for further code reduction.Size reduction (as reported by
size -t libs/*cre*
using the debug build, no LTO):inlinehidden
visibilitySo a 463.1 kB reduction.
This change is