Skip to main content

prebuilt_apple_framework

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

Function Signature

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

Parameters

  • name: (required)

    name of the target

  • default_target_platform: (defaults to: None)

    specifies the default target platform, used when no platforms are specified on the command line

  • target_compatible_with: (defaults to: [])

    a list of constraints that are required to be satisfied for this target to be compatible with a configuration

  • compatible_with: (defaults to: [])

    a list of constraints that are required to be satisfied for this target to be compatible with a configuration

  • exec_compatible_with: (defaults to: [])

    a list of constraints that are required to be satisfied for this target to be compatible with an execution platform

  • visibility: (defaults to: [])

    a list of visibility patterns restricting what targets can depend on this one

  • within_view: (defaults to: ["PUBLIC"])

    a list of visibility patterns restricting what this target can depend on

  • metadata: (defaults to: {})

    a key-value map of metadata associated with this target

  • tests: (defaults to: [])

    a list of targets that provide tests for this one

  • modifiers: (defaults to: [])

    an array of modifiers associated with this target

  • extra_codesign_paths: (defaults to: [])

    A list of extra paths, relative to the framework root, that will be codesigned.

  • preferred_linkage: (defaults to: "any")

    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.

  • supported_platforms_regex: (defaults to: None)

    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.

Examples



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