-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Reduce compiled tdlib size #2020
Comments
You need to use also |
Also, the prebuilt version links libc++ dynamically, so it still be slighly less even after the change, but the total size of libtdjni and libc++ should be bigger after that. |
These flags had no effect unfortunately, I've also just noticed this warning during the build
CMakeOutput.log The warning won't appear with no CMAKE flags+custom strip command set in the CMakeLists file |
So I managed to fix the app:stripDebugDebugSymbols error, for some strange reason I also had to add ndkVersion in my app module. unfortunately the two new flags you suggested still have no effect. |
Could you recheck that the flags are appended to |
I can see those flags in these files: I noticed that the flags that actually shrink the lib are the SHARED_LINKER ones, CMAKE_CXX_FLAGS have no effect on the lib size. By adding ndkVersion in the app module I could remove the strip custom_command in CMake since it is now done at compile time via gradle with app:stripDebugDebugSymbols |
No, the output confirms that there were no flags added. You need to add the line |
You meant |
I've noticed that the libtdjni.so lib compiled in my Android Studio project is slightly bigger than the prebuilt/TGX one (4MB less). Is there any way to optimize even more my build? Here's the CMake flags I'm currently using (took from Issue #77):
build.gradle:
The text was updated successfully, but these errors were encountered: