Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply default cpu based on target Apple platform #899

Conversation

thii
Copy link
Member

@thii thii commented Sep 9, 2022

If --apple_platform_type is passed but --cpu or --{ios_multi|watchos|tvos|macos}_cpus is not passed, apply a transition to change the --cpu flag to a default cpu based on the target platform.

The transitions.bzl was copied from https://github.com/bazelbuild/bazel/blob/5604779c98edee9bedbe668ca72f2aa1ffb4cf2e/src/main/starlark/builtins_bzl/common/objc/transitions.bzl#L1 with the //command_line_option:incompatible_enable_apple_toolchain_resolution flag removed to continue supporting Bazel 5.x.

Fixes #897

@thii thii force-pushed the thi/apply-default-cpu-based-on-target-apple-platform branch from 3d04948 to f03cf38 Compare September 9, 2022 04:39
If `--apple_platform_type` is passed but `--cpu` or
`--{ios_multi|watchos|tvos|macos}_cpus` is not passed, apply a transition
to change the `--cpu` flag to a default `cpu` based on the target
platform.

The transitions.bzl was copied from
https://github.com/bazelbuild/bazel/blob/5604779c98edee9bedbe668ca72f2aa1ffb4cf2e/src/main/starlark/builtins_bzl/common/objc/transitions.bzl#L1
with the `//command_line_option:incompatible_enable_apple_toolchain_resolution`
flag removed to continue supporting Bazel 5.x.
@thii thii force-pushed the thi/apply-default-cpu-based-on-target-apple-platform branch from f03cf38 to 2e8e627 Compare September 9, 2022 04:40
@thii thii marked this pull request as ready for review September 9, 2022 04:44
@thii thii marked this pull request as draft September 9, 2022 13:42
@thii thii closed this Sep 21, 2022
@thii thii deleted the thi/apply-default-cpu-based-on-target-apple-platform branch September 21, 2022 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting --apple_platform_type=ios no longer sets APPLE_PLATFORM_SDK
1 participant