Skip to content

Commit

Permalink
Fix Android platforms constraint
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`.
  • Loading branch information
sifmelcara committed Mar 20, 2024
1 parent 7746272 commit dbf3fd5
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 dbf3fd5

Please sign in to comment.