load("@tools_ocaml//rules:cppo.bzl", "cppo")
cppo
Process file with cppo.
Example:
cppo(
name = "ExtArray.cppo_mli",
srcs = ["extArray.mli"],
opts = ["-I", "foo"],
defines = [
"OCAML 407"
] + WORD_SIZE + HAS_BYTES_FLAG,
undefines = ["FOO"],
exts = {
"lowercase": 'tr "[A-Z]" "[a-z]"'
}
)
Output has same name as input, but is output to a Bazel-controlled dir (e.g. bazel-bin/src)
ATTRIBUTES for rule cppo:
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
A unique name for this target. |
required |
|||
- |
optional |
[] |
||
- |
optional |
[] |
||
CPPO -D (define) declarations. |
List of strings |
optional |
[] |
|
Defines custom preprocessor target section (-x parameter) |
optional |
{} |
||
- |
String |
optional |
"" |
|
- |
List of strings |
optional |
[] |
|
CPPO -U (undefine) declarations. |
List of strings |
optional |
[] |
|
Dictionary of cppo VAR (-V) options. Keys: label. Values: string VAR name. |
optional |
{} |