Skip to main content

prebuilt_apple_framework

prebuilt_apple_framework

def prebuilt_apple_framework(
*,
name: str,
default_target_platform: None | str = None,
target_compatible_with: list[str] = [],
compatible_with: list[str] = [],
exec_compatible_with: list[str] = [],
visibility: list[str] = [],
within_view: list[str] = ["PUBLIC"],
metadata: OpaqueMetadata = {},
tests: list[str] = [],
modifiers: OpaqueMetadata = [],
_apple_platforms: dict[str, str] = {},
_apple_toolchain: str = "gh_facebook_buck2_shims_meta//:apple-default",
_apple_tools: str = "prelude//apple/tools:apple-tools",
_stripped_default: bool = False,
contacts: list[str] = [],
contains_swift: bool = False,
default_host_platform: None | str = None,
deps: list[str] = [],
dsyms: list[str] = [],
exported_linker_flags: list[str] = [],
exported_platform_linker_flags: list[(str, list[str])] = [],
extra_codesign_paths: list[str] = [],
framework: None | str = None,
frameworks: list[str] = [],
labels: list[str] = [],
libraries: list[str] = [],
licenses: list[str] = [],
modular: bool = True,
preferred_linkage: str = "any",
sdk_modules: list[str] = [],
stripped: None | bool = None,
supported_platforms_regex: None | str = None,
) -> None

A prebuilt_apple_framework() rule represents a set of Objective-C/C++ source files and is very similar to a prebuilt_cxx_library() rule.

Parameters

  • name: name of the target
  • default_target_platform: specifies the default target platform, used when no platforms are specified on the command line
  • target_compatible_with: a list of constraints that are required to be satisfied for this target to be compatible with a configuration
  • compatible_with: a list of constraints that are required to be satisfied for this target to be compatible with a configuration
  • exec_compatible_with: a list of constraints that are required to be satisfied for this target to be compatible with an execution platform
  • visibility: a list of visibility patterns restricting what targets can depend on this one
  • within_view: a list of visibility patterns restricting what this target can depend on
  • metadata: a key-value map of metadata associated with this target
  • tests: a list of targets that provide tests for this one
  • modifiers: an array of modifiers associated with this target
  • extra_codesign_paths: A list of extra paths, relative to the framework root, that will be codesigned.
  • preferred_linkage: How to link to a binary: use dynamic for a dynamic framework, and static for old universal static frameworks manually lipo-ed together. dynamic will copy the frameworks into the Frameworks directory of an Apple bundle, and configure framework search paths and linker flags. static will copy the resources of the framework into an Apple bundle.

Details

Examples:


prebuilt_apple_framework(
name = 'MyPrebuiltFramework',
framework = 'myPrebuiltFramework.framework',
preferred_linkage = 'static',
visibility = [
'PUBLIC'
]
)