Skip to content

Latest commit

 

History

History
executable file
·
41 lines (25 loc) · 1.78 KB

transition_support_doc.md

File metadata and controls

executable file
·
41 lines (25 loc) · 1.78 KB

Starlark transition support for Apple rules.

This module makes the following distinctions around Apple CPU-adjacent values for clarity, based in part on the language used for XCFramework library identifiers:

  • architectures or "arch"s represent the type of binary slice ("arm64", "x86_64").

  • environments represent a platform variant ("device", "sim"). These sometimes appear in the "cpu" keys out of necessity to distinguish new "cpu"s from an existing Apple "cpu" when a new Crosstool-provided toolchain is established.

  • platform_types represent the Apple OS being built for ("ios", "macos", "tvos", "visionos", "watchos").

  • cpus are keys to match a Crosstool-provided toolchain ("ios_sim_arm64", "ios_x86_64"). Essentially it is a raw key that implicitly references the other three values for the purpose of getting the right Apple toolchain to build outputs with from the Apple Crosstool.

transition_support.current_apple_platform

load("@rules_ios//rules:transition_support.bzl", "transition_support")

transition_support.current_apple_platform(apple_fragment, xcode_config)

Returns a struct containing the platform and target os version

PARAMETERS

Name Description Default Value
apple_fragment

-

none
xcode_config

-

none