Provide tools for a hermetic build.

hermetic_exec

A exec that uses hermetic tools.

Hermetic tools are resolved from toolchain resolution. To replace it, register a different hermetic toolchain.

PARAMETERS

NameDescriptionDefault Value
namename of the targetnone
scriptSee [exec.script]none
dataSee [exec.data]None
kwargsSee [exec]none

hermetic_exec_test

A exec_test that uses hermetic tools.

Hermetic tools are resolved from toolchain resolution. To replace it, register a different hermetic toolchain.

PARAMETERS

NameDescriptionDefault Value
namename of the targetnone
scriptSee [exec_test.script]none
dataSee [exec_test.data]None
kwargsSee [exec_test]none

hermetic_genrule

A genrule that uses hermetic tools.

Hermetic tools are resolved from toolchain resolution. To replace it, register a different hermetic toolchain.

Only cmd is expected and used. cmd_bash, cmd_ps, cmd_bat etc. are ignored.

PARAMETERS

NameDescriptionDefault Value
namename of the targetnone
cmdSee genrule.cmdnone
toolsSee genrule.toolsNone
use_cc_toolchainWhen set to True resolved CC toolchain is accessible from the genrule.None
kwargsSee genrulenone

hermetic_toolchain.get

Returns the resolved toolchain information.

PARAMETERS

NameDescriptionDefault Value
ctxctx. The rule must contain toolchains = [ hermetic_toolchain.type, ]none

RETURNS

_HermeticToolchainInfo (see hermetic_tools.bzl).

hermetic_tools

Provide tools for a hermetic build.

PARAMETERS

NameDescriptionDefault Value
namename of the targetnone
depsadditional dependencies. These aren't added to the PATH.None
symlinksA dictionary, where keys are labels to an executable, and values are names to the tool, separated with :. e.g.

{“//label/to:toybox”: “cp:realpath”}
None
kwargsAdditional attributes to the internal rule, e.g. visibility. See complete list here.none