select_file() build rule implementation.

Selects a single file from the outputs of a target by given relative path.

select_file


load("@bazel_skylib//rules:select_file.bzl", "select_file") select_file(<a href="#select_file-name">name</a>, <a href="#select_file-srcs">srcs</a>, <a href="#select_file-subpath">subpath</a>)

Selects a single file from the outputs of a target by given relative path

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
srcsThe target producing the file among other outputsLabelrequired
subpathRelative path to the fileStringrequired