Mark some targets with target_compatible_with.

objc_library really will only build for Apple platforms, so tag it as such.

The objc conformance test really will only build/run on macOS, so tag it as
such.

With these two changes, it should be safer for recursive builds that include
this directory no matter what the host platform is.

PiperOrigin-RevId: 508438744
pull/11891/head
Protobuf Team Bot 2 years ago committed by Copybara-Service
parent 2fed1e3e83
commit b977cf5c7e
  1. 8
      objectivec/BUILD.bazel

@ -88,6 +88,13 @@ objc_library(
"GPBWireFormat.m",
"GPBWrappers.pbobjc.m",
],
target_compatible_with = select({
"@platforms//os:macos": [],
"@platforms//os:ios": [],
"@platforms//os:tvos": [],
"@platforms//os:watchos": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
visibility = ["//visibility:public"],
)
@ -99,6 +106,7 @@ conformance_test(
name = "conformance_test",
failure_list = "//conformance:failure_list_objc.txt",
testee = "//conformance:conformance_objc",
target_compatible_with = ["@platforms//os:macos"],
)
# -------------------------------------------------------------------

Loading…
Cancel
Save