Loads a particular version of clang.

One of cipd_tag or local_archive must be set.

If cipd_tag is set, sha256 can optionally be set to verify the downloaded file and to allow Bazel to cache the file.

If cipd_tag is not set, local_archive must be set to the path of a core IDK archive file.


Name Description Type Mandatory Default
name A unique name for this repository. Name required -
repo_mapping In WORKSPACE context only: a dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.

For example, an entry "@foo": "@bar" declares that, for any time this repository depends on @foo (such as a dependency on @foo//some:target, it should actually resolve that dependency within globally-declared @bar (@bar//some:target).

This attribute is not supported in MODULE.bazel context (when invoking a repository rule inside a module extension's implementation function).
String Dict optional -
cipd_tag CIPD tag for the version to load. String optional ""
sha256 Optional SHA-256 hash of the clang archive. Valid keys are mac and linux String Dict optional {}
local_archive local clang archive file. String optional ""
local_path local clang installation directory, relative to workspace root. String optional ""
from_workspace Any label to a bazel external workspace containing a clang installation. Label optional None
local_version_file Optional path to a workspace-relative path to a version file for this clang installation. Label optional None
sdk_root_label The fuchsia sdk root label. eg: @fuchsia_sdk Label optional "@fuchsia_sdk"
rules_fuchsia_root_label The fuchsia workspace rules root label. eg: @fuchsia_sdk Label optional "@fuchsia_sdk"
cipd_ensure_file A cipd ensure file to use to download clang. Label optional None
cipd_bin The cipd binary that will be used to download the sdk Label optional None


This repository rule depends on the following environment variables: