Skip to content

Infer tvOS/watchOS archs from the CPU parameters, similarly to iOS#2707

Merged
luispadron merged 1 commit intobazelbuild:mainfrom
rockbruno:patch-1
Jan 8, 2026
Merged

Infer tvOS/watchOS archs from the CPU parameters, similarly to iOS#2707
luispadron merged 1 commit intobazelbuild:mainfrom
rockbruno:patch-1

Conversation

@rockbruno
Copy link
Copy Markdown
Contributor

iOS currently has some special logic in transition_support.bzl that defaults the architecture to the value of //command_line_option:cpu if the value is iOS related (or a arm64 mac), but the same was not being done for other platforms. This was causing some confusion on our team as although on one end the regular iOS builds were being automatically resolved to arm64 simulator builds, on the other end everything else was resolving to x86_64 despite no changes in the environment.

This PR adds this same special logic to tvOS/watchOS for make them consistent with iOS. So in my case, building tvOS from a arm64 mac would now result in a tvOS arm64 simulator build.

It's unclear to me if the iOS case was done just to support some legacy use-case (meaning we should probably not do this for the other platforms), so if that's the case, let me know how to best solve this!

@google-cla
Copy link
Copy Markdown

google-cla bot commented May 6, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@keith
Copy link
Copy Markdown
Member

keith commented May 6, 2025

I don't feel strongly about this, but you're right that it was because iOS existed before the --cpu type options were no longer recommended, so the google folks didn't implement this for the other platforms so that folks didn't start relying on it. IMO it's so low impact it would be fine to land

@rockbruno
Copy link
Copy Markdown
Contributor Author

@brentleyjones @luispadron Any thoughts on this?

@rockbruno rockbruno requested a review from adincebic as a code owner January 8, 2026 07:45
@luispadron luispadron enabled auto-merge (squash) January 8, 2026 16:23
@luispadron luispadron merged commit 55f6ece into bazelbuild:main Jan 8, 2026
8 checks passed
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.

3 participants