cc
Rules for CC.
bzd_cc_library
load("@bzd//cc/bdl:cc.bzl", "bzd_cc_library") bzd_cc_library(tags, **kwags)
Rule to define a bzd C++ library.
PARAMETERS
Name | Description | Default Value |
---|---|---|
tags | - |
[] |
kwags | - |
none |
bzd_cc_test
load("@bzd//cc/bdl:cc.bzl", "bzd_cc_test") bzd_cc_test(name, target, tags, bdls, hdrs, srcs, deps, testonly, **kwargs)
Rule that defines a bzd C++ test binary.
PARAMETERS
bzd_cc_binary
load("@bzd//cc/bdl:cc.bzl", "bzd_cc_binary") bzd_cc_binary(*, name, deps, srcs, data, hdrs, args, bdls, compatible_with, deprecation, exec_compatible_with, exec_properties, features, output_licenses, package_metadata, restricted_to, tags, target, target_compatible_with, testonly, toolchains, visibility)
ATTRIBUTES
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | A unique name for this macro instance. Normally, this is also the name for the macro's main or only target. The names of any other targets that this macro might create will be this name with a string suffix. | Name | required | |
deps | Dependencies to be added to the rule. | List of labels; nonconfigurable | optional | [] |
srcs | Sources to be added to the rule. | List of labels; nonconfigurable | optional | [] |
data | Files to be added to the runfiles. | List of labels | optional | None |
hdrs | Headers to be added to the rule. | List of labels; nonconfigurable | optional | [] |
args | Inherited rule attribute | List of strings | optional | None |
bdls | BDLs to be added to the rule. | List of labels; nonconfigurable | optional | [] |
compatible_with | Inherited rule attribute | List of labels; nonconfigurable | optional | None |
deprecation | Inherited rule attribute | String; nonconfigurable | optional | None |
exec_compatible_with | Inherited rule attribute | List of labels; nonconfigurable | optional | None |
exec_properties | Inherited rule attribute | Dictionary: String -> String | optional | None |
features | Inherited rule attribute | List of strings | optional | None |
output_licenses | Inherited rule attribute | List of strings | optional | None |
package_metadata | Inherited rule attribute | List of labels; nonconfigurable | optional | None |
restricted_to | Inherited rule attribute | List of labels; nonconfigurable | optional | None |
tags | Tags to be added to the rule. | List of strings; nonconfigurable | optional | [] |
target | The target name | Label; nonconfigurable | optional | "@bzd//cc/targets:auto" |
target_compatible_with | Inherited rule attribute | List of labels | optional | None |
testonly | Set testonly attribute. | Boolean; nonconfigurable | optional | None |
toolchains | Inherited rule attribute | List of labels | optional | None |
visibility | The visibility to be passed to this macro's exported targets. It always implicitly includes the location where this macro is instantiated, so this attribute only needs to be explicitly set if you want the macro's targets to be additionally visible somewhere else. | List of labels; nonconfigurable | optional |