You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
android_binary builds will fail if ANDROID_NDK_HOME / android_ndk_repository aren't set even if it does not rely on native libs.
The implicit CC toolchain dependency originates here, and is unconditionally used for processing in native_libs.bzl
I was able to get our app to build without setting the NDK by butchering the toolchain code out, more or less, but a more elegant optionality would be great.
The text was updated successfully, but these errors were encountered:
The example app is simple (by design), is there something missing that can trigger this without depending on native libs? Does your app have a dependency on something with native libs?
There is a PR in rules_android_ndk that would allow setting an android_ndk_repository without an actual NDK present to stub out the NDK: bazelbuild/rules_android_ndk#63 but that is stalled due to bandwidth (and really that's somewhat of a workaround vs actually not depending on the NDK or NDK CC toolchain and related machinery when you don't really need it).
Late my time so I can't dig all the way down—but I think when setting the platforms, the transition moves away from the host (where the CC toolchain is resolved using host?) to an Android platform (where the CC toolchain is not found?)
erikkerber
added a commit
to tinyspeck/rules_android
that referenced
this issue
Nov 20, 2024
android_binary
builds will fail ifANDROID_NDK_HOME
/android_ndk_repository
aren't set even if it does not rely on native libs.The implicit CC toolchain dependency originates here, and is unconditionally used for processing in native_libs.bzl
I was able to get our app to build without setting the NDK by butchering the toolchain code out, more or less, but a more elegant optionality would be great.
The text was updated successfully, but these errors were encountered: