Platform Rules
constraint_setting
constraint_setting(name, deprecation, distribs, features, licenses, tags, testonly, visibility)
This rule defines a type of constraint that can be used to define an execution platform.
Arguments
Attributes | |
---|---|
name |
A unique name for this rule. |
constraint_value
constraint_value(name, constraint_setting, deprecation, distribs, features, licenses, tags, testonly, visibility)
This rule defines a specific value of a constraint, which can be used to define execution platforms.
Arguments
Attributes | |
---|---|
name |
A unique name for this rule. |
constraint_setting
|
|
platform
platform(name, constraint_values, deprecation, distribs, features, licenses, remote_execution_properties, tags, testonly, visibility)
This rule defines a platform, as a collection of constraint_values.
Examples
This defines two possible platforms, each targeting a different CPU type.
constraint_setting(name="cpu") constraint_value( name="arm64", constraint_setting=":cpu") constraint_value( name="k8", constraint_setting=":cpu") platform( name="mobile_device", constraint_values = [ ":arm64", ]) platform( name="devel", constraint_values = [ ":k8", ])
Arguments
Attributes | |
---|---|
name |
A unique name for this rule. |
constraint_values
|
|
remote_execution_properties
|
|
toolchain
toolchain(name, deprecation, distribs, exec_compatible_with, features, licenses, tags, target_compatible_with, testonly, toolchain, toolchain_type, visibility)
This rule declares a specific toolchain's type and constraints so that it can be selected during toolchain resolution.
Arguments
Attributes | |
---|---|
name |
A unique name for this rule. |
exec_compatible_with
|
|
target_compatible_with
|
|
toolchain
|
|
toolchain_type
|
|