Skip to content

Commit

Permalink
drop selection
Browse files Browse the repository at this point in the history
  • Loading branch information
themz committed Oct 7, 2024
1 parent 2592479 commit b26ebca
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions apple/internal/platform_support.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,19 @@ def _platform_prerequisites(
A struct representing the collected platform information.
"""
platform_type_attr = getattr(apple_common.platform_type, platform_type_string)
platform = apple_fragment.multi_arch_platform(platform_type_attr)

if environment == TARGET_ENVIROMENT.simulator:
platform = apple_common.platform.macos
if environment == TARGET_ENVIROMENT.device:
if platform_type_attr == apple_common.platform_type.ios:
platform = apple_common.platform.ios_device
elif platform_type_attr == apple_common.platform_type.tvos:
platform = apple_common.platform.tvos_device
elif platform_type_attr == apple_common.platform_type.visionos:
platform = apple_common.platform.visionos_device
elif platform_type_attr == apple_common.platform_type.watchos:
platform = apple_common.platform.watchos_device
else:
platform = apple_common.platform.macos
elif environment == TARGET_ENVIROMENT.simulator:
if platform_type_attr == apple_common.platform_type.ios:
platform = apple_common.platform.ios_simulator
elif platform_type_attr == apple_common.platform_type.tvos:
Expand Down

0 comments on commit b26ebca

Please sign in to comment.