diff options
author | Keith Smiley <keithbsmiley@gmail.com> | 2023-07-05 17:35:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-06 00:35:43 +0000 |
commit | 2c94c252e4fd6b0eaa3682c0923523c64cf79e7f (patch) | |
tree | 400692a082a62a112b6b64ad927819eefe0c30b2 | |
parent | a1dfefc9f0cddcee437d1eba355dab657be752d2 (diff) | |
download | bazelbuild-apple_support-2c94c252e4fd6b0eaa3682c0923523c64cf79e7f.tar.gz |
Fix apple config setting group for 'darwin' CPU (#225)upstream/1.7.1
As of bazel 7.x 'darwin' as a CPU is no longer valid, and
'darwin_x86_64' is used instead. But while users of this config setting
might still be on older versions of bazel this adds support for that in
the config settings.
-rw-r--r-- | configs/BUILD | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/configs/BUILD b/configs/BUILD index 0e31575..6580050 100644 --- a/configs/BUILD +++ b/configs/BUILD @@ -8,7 +8,7 @@ selects.config_setting_group( match_any = [ cpu for cpu in APPLE_PLATFORMS_CONSTRAINTS.keys() - ], + ] + ["darwin"], ) [ @@ -19,13 +19,19 @@ selects.config_setting_group( for cpu in APPLE_PLATFORMS_CONSTRAINTS.keys() ] +# TODO: Remove all references to 'darwin' as a CPU once we no longer support bazel 6.x +config_setting( + name = "darwin", + values = {"cpu": "darwin"}, +) + selects.config_setting_group( name = "any_device", match_any = [ cpu for cpu, constraints in APPLE_PLATFORMS_CONSTRAINTS.items() if "@build_bazel_apple_support//constraints:device" in constraints - ], + ] + ["darwin"], ) selects.config_setting_group( |