Skip to content

Commit 2af3bad

Browse files
authored
Use apple constraints over config_setting_group in select (#1563)
The intent of @apple_support//configs:apple is to provide a way for users to select on whether the current platform is an apple one or not. It does that by iterating over APPLE_PLATFORMS_CONSTRAINTS, and checking whether the "cpus" is one of the apple known CPUs. This works in the general case, but in the exceptional case where the user wants to define custom apple platforms, it is a problem. So in this patchset we're switching to using the constraint directly over the config_setting_group(). It should be a functional no-op for the general case, but it provides more flexibility if case the user needs a higher degree of customization.
1 parent 646d6d2 commit 2af3bad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

swift/internal/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ licenses(["notice"])
77
alias(
88
name = "swizzle_absolute_xcttestsourcelocation",
99
actual = select({
10-
"@build_bazel_apple_support//configs:apple": (
10+
"@build_bazel_apple_support//constraints:apple": (
1111
"@build_bazel_apple_support//lib:swizzle_absolute_xcttestsourcelocation"
1212
),
1313
"//conditions:default": ":dummy_swizzle_absolute_xcttestsourcelocation",

tools/worker/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ cc_library(
7575
],
7676
}),
7777
data = select({
78-
"@build_bazel_apple_support//configs:apple": [
78+
"@build_bazel_apple_support//constraints:apple": [
7979
"@build_bazel_rules_swift_index_import_5_8//:index_import",
8080
"@build_bazel_rules_swift_index_import_6_1//:index_import",
8181
],

0 commit comments

Comments
 (0)