Skip to content

Commit

Permalink
Fix Android platforms constraint (#16246) (#16271)
Browse files Browse the repository at this point in the history
When using bazel platforms and new rules_android_ndk, crosstool_top is actually still `//external:android/crosstool`. The right way to detect Android is to use `constraint_value`.

Closes #16246

COPYBARA_INTEGRATE_REVIEW=#16246 from sifmelcara:fix-platforms dbf3fd5
PiperOrigin-RevId: 618198820

Co-authored-by: Ming-Chuan <[email protected]>
  • Loading branch information
acozzette and sifmelcara committed Mar 22, 2024
1 parent a97c927 commit b4e1870
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions build_defs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ config_setting(
# When using https://bazel.build/concepts/platforms
config_setting(
name = "config_android",
values = {
"crosstool_top": "@platforms//os:android",
},
constraint_values = ["@platforms//os:android"],
)

# When using legacy flags like --android_crosstool_top, --android_cpu, and --fat_apk_cpu
Expand Down

0 comments on commit b4e1870

Please sign in to comment.