-
Notifications
You must be signed in to change notification settings - Fork 258
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
only use --gc-sections for release builds, because it can harm debugging #1813
Comments
The rationale from Studio:
|
This can't be fixed for the new CMake toolchain, only the legacy one (which is fortunately the default), because CMake doesn't have an affordance for us to override ldflags for specific build modes: https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/Platform/Android-Clang.cmake#L16-21 r25c will fix ndk-build and the legacy cmake toolchain file (again, the default), but the new form is going to remain broken until someone can be freed up to spend the time needed to make cmake work for us. |
Forked the new toolchain file stuff into #1826. |
The user may want to call "unused" functions during debugging. This fix does not cover the new cmake toolchain. afaict CMake does not give us the control needed to fix this bug without entirely reverting the feature in that mode (we can control linker flags, but not per mode). Bug: android/ndk#1813 Test: expanded the gc-sections test Change-Id: I095e2e70f522f4dbd5021f0efab49dfd86cfba51
Description
#1717 needs a partial revert
The text was updated successfully, but these errors were encountered: