You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found the size of libraries and generated didn't get smaller comparing to "DCMAKE_BUILD_TYPE=Debug"
After some research, I found the root cause is that -g flags is appended to "ANDROID_COMPILER_FLAGS" by default.
Removing this will successfully build a release version library.
So, I am wondering why the -g flags is set? How can I remove it without modifying "android.toolchain.cmake" under "/build/cmake" ?
Besides, this happens to ndk 16 too.
Environment Details
Not all of these will be relevant to every bug, but please provide as much
information as you can.
NDK Version: 22.0.7026061
Build system: CMake
Host OS: Ubuntu 18.04
ABI: armeabi-v7a
NDK API level: 27
Device API level:
The text was updated successfully, but these errors were encountered:
Description
Can not build a release version with cmake and "CMAKE_TOOLCHAIN_FILE" already set to "Release"
When doing a cross compile using ndk-22 with cmake. And specify CMAK_BUILD_TYPE by doing this:
I found the size of libraries and generated didn't get smaller comparing to "DCMAKE_BUILD_TYPE=Debug"
After some research, I found the root cause is that -g flags is appended to "ANDROID_COMPILER_FLAGS" by default.
Removing this will successfully build a release version library.
So, I am wondering why the -g flags is set? How can I remove it without modifying "android.toolchain.cmake" under "/build/cmake" ?
Besides, this happens to ndk 16 too.
Environment Details
Not all of these will be relevant to every bug, but please provide as much
information as you can.
The text was updated successfully, but these errors were encountered: