Skip to content

reduce android sdk size by stripping the debug symbol #254

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

Merged
merged 1 commit into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmake/build_shared.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ function(build_firebase_shared LIBRARY_NAME ARTIFACT_NAME OUTPUT_NAME)
# Link against the static libc++, which is the default done by Gradle.
"-static-libstdc++"
)
add_custom_command(TARGET ${shared_target} POST_BUILD
COMMAND "${ANDROID_TOOLCHAIN_PREFIX}strip" -g -S -d --strip-debug --verbose
"lib${OUTPUT_NAME}.so"
COMMENT "Strip debug symbols done on final binary. lib${OUTPUT_NAME}.so")
endif()

unity_pack_native(${shared_target})
Expand Down
4 changes: 4 additions & 0 deletions cmake/build_universal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ function(build_uni TARGET_LINK_LIB_NAMES PROJECT_LIST_HEADER_VARIABLE)
# Link against the static libc++, which is the default done by Gradle.
"-static-libstdc++"
)
add_custom_command(TARGET firebase_app_uni POST_BUILD
COMMAND "${ANDROID_TOOLCHAIN_PREFIX}strip" -g -S -d --strip-debug --verbose
"lib${FIREBASE_APP_UNI_VERSIONED}.so"
COMMENT "Strip debug symbols done on final binary. lib${FIREBASE_APP_UNI_VERSIONED}.so")
endif()

unity_pack_native(firebase_app_uni)
Expand Down