bazel
bazel copied to clipboard
android_library deps stripped *.so
Description of the problem / feature request:
I want to use a stripped library *.so in an android_library but android_library deps can't be a stripped cc_binary
Feature requests: what underlying problem are you trying to solve with this feature?
android_library deps can be cc_binary or a genrule
Have you tried using a cc_import
rule on the .so file, and creating a cc_library
from that cc_import
target? https://docs.bazel.build/versions/master/be/c-cpp.html#cc_import
We have a use case for this feature. Our project uses a tool to extract symbols from a so
library. Later, if the app crashes on the user's device, we can use the extracted symbols to symbolize the crash log. Similar to using the dSYM to symbolize the crash log for iOS app.
When using Gradle and CMake to build the android app, the unstripped so
library is stored in intermediate folders. Then the so
will be stripped and put into apk.
Maybe we can do something similar with bazel. When build android_binary
we can supply --strip=never
flag to make android_library
produce an unstripped so
library. Then in the implementation of
android_binary, we strip the
so` library.