Infer tvOS/watchOS archs from the CPU parameters, similarly to iOS #2707
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!