summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Levin <nglevin@google.com>2023-09-25 09:44:21 -0700
committerThi Doãn <t@thi.im>2023-09-26 22:30:48 +0900
commit40cef1147b306fa0c0d529d293a6aa62351c7fe8 (patch)
tree1320273ac00e5e546f277f02eecdda0c3819655f
parent45daa81ec696de891ecb5c4d4b6f3bdf99b19e03 (diff)
downloadbazelbuild-apple_support-40cef1147b306fa0c0d529d293a6aa62351c7fe8.tar.gz
Add an "apple" constraint to be associated with all Apple platform definitions.
PiperOrigin-RevId: 568245848 (cherry picked from commit 35a049aaccc5139759c41a9877400288eae87d90)
-rw-r--r--constraints/BUILD11
1 files changed, 11 insertions, 0 deletions
diff --git a/constraints/BUILD b/constraints/BUILD
index 34ec245..b63a382 100644
--- a/constraints/BUILD
+++ b/constraints/BUILD
@@ -31,6 +31,17 @@ constraint_value(
constraint_setting = ":target_environment",
)
+# Constraint indicating if the platform belongs to an "Apple" platform (iOS, watchOS, tvOS, etc.)
+constraint_setting(
+ name = "target_vendor",
+ visibility = ["//visibility:private"],
+)
+
+constraint_value(
+ name = "apple",
+ constraint_setting = ":target_vendor",
+)
+
# Consumed by bazel tests.
filegroup(
name = "for_bazel_tests",