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 targetdefault_target_platform: specifies the default target platform, used when no platforms are specified on the command linetarget_compatible_with: a list of constraints that are required to be satisfied for this target to be compatible with a configurationcompatible_with: a list of constraints that are required to be satisfied for this target to be compatible with a configurationexec_compatible_with: a list of constraints that are required to be satisfied for this target to be compatible with an execution platformvisibility: a list of visibility patterns restricting what targets can depend on this onewithin_view: a list of visibility patterns restricting what this target can depend onmetadata: a key-value map of metadata associated with this targettests: a list of targets that provide tests for this onemodifiers: an array of modifiers associated with this targetextra_codesign_paths: A list of extra paths, relative to the framework root, that will be codesigned.preferred_linkage: How to link to a binary: usedynamicfor a dynamic framework, andstaticfor old universal static frameworks manually lipo-ed together.dynamicwill copy the frameworks into theFrameworksdirectory of an Apple bundle, and configure framework search paths and linker flags.staticwill copy the resources of the framework into an Apple bundle.supported_platforms_regex: If present, an un-anchored regex (in java.util.regex.Pattern syntax) that matches all platforms that this library supports. It will not be built for other platforms.
Details
Examples:
prebuilt_apple_framework(
name = 'MyPrebuiltFramework',
framework = 'myPrebuiltFramework.framework',
preferred_linkage = 'static',
visibility = [
'PUBLIC'
]
)