-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
--incompatible_remove_legacy_whole_archive produces empty .so binary #10051
Comments
I guess it can be solved by including alwayslink = True in cc_library but that feels wrong. |
I presume you're creating the final shared library using |
Closing for inactivity, please complain to reopen :) |
@hlopko, hey, I think it relates to #10323 which essentially breaks the official NDK example (see bazelbuild/examples#125 as well). Setting
|
Seems to be related to #7362 as well. Actually, it was explicitly mentioned but didn’t get into the documentation and samples. @hlopko, can you please explain for dummies like me what’s happening? Feels like |
Noticed this issue while migrating from bazel 0.29.1 to 1.0.0
I have an Android app that has NO java code (AndroidManifest defines android:hasCode="false"), and all the implementation is in JNI (lots of code).
bazel 0.29.1 produces a 290kb libjni.so binary
bazel 1.0.0 produces 6444 libjni.so binary. All the code is essentially stripped (ANactiveActivity_onCreate is missing, along with everything it calls).
I tracked it down to --incompatible_remove_legacy_whole_archive flag. Once enabled on 0.29.1, it produces the same broken .so file.
Not sure if it's related, but it could have something to do with my app not having any Java code:
This creates NativeActivity which loads libjni.so. With 1.0.0 (or with --incompatible_remove_legacy_whole_archive) produced binary is a toast.
The text was updated successfully, but these errors were encountered: