-Wl,--gc-sections
is no longer set by default for debug builds. This behavior was removed because it could cause the linker to remove functions that may be useful to evaluate during debugging. The new CMake toolchain file (-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF
, not the default behavior) does not include this fix because it requires a CMake fix first.