Fix Android platforms constraint (#16246)

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=https://github.com/protocolbuffers/protobuf/pull/16246 from sifmelcara:fix-platforms dbf3fd58db
PiperOrigin-RevId: 618198820
pull/16259/head
Ming-Chuan 8 months ago committed by Copybara-Service
parent 68e6e3e8ee
commit eef55641f8
  1. 4
      build_defs/BUILD.bazel

@ -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

Loading…
Cancel
Save