Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 2.47 KB

bzlws_link.md

File metadata and controls

31 lines (19 loc) · 2.47 KB

bzlws_link

load("@bzlws//rules:bzlws_link.bzl", "bzlws_link")

bzlws_link(name, srcs, out, force, strip_filepath_prefix, metafile_path, visibility, kwargs)

Symlink generated files into workspace directory

PARAMETERS

Name Description Default Value
name Name used for executable target None
srcs List of files that should be symlinked None
out Output path within the workspace. Certain strings get replaced with workspace status values and information about the srcs. This happens in 2 phases.

Phase 1:

The workspace status stamp values get replaced in this format: {KEY}. For example if you would like to have the name of the host machine in your output path you would put out = "my/path/{BUILD_HOST}/{FILENAME}"

Phase 2:

The following gets replaced about each items in srcs

{BAZEL_LABEL_NAME} - Label name

{BAZEL_LABEL_PACKAGE} - Label package

{BAZEL_LABEL_WORKSPACE_NAME} - Workspace name of the label

{BAZEL_FULL_LABEL} - Fulll label string

{BAZEL_LABEL} - Full label without the workspace name

{EXT} - File extension (with the dot)

{EXTNAME} - File extension name (without the dot)

{FILENAME} - File name with extension

{FILEPATH} - File path. https://bazel.build/rules/lib/File#path

{BASENAME} - Path basename
None
force Overwrite existing paths even if they are not symlinks None
strip_filepath_prefix Strip prefix of {FILEPATH} ""
metafile_path Path to metafile ""
visibility visibility of the executable target None
kwargs rest of arguments get passed to underlying targets none