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.

## **ATTRIBUTES**

| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this repository. | [Name](https://bazel.build/concepts/labels#target-names) | 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](https://bazel.build/rules/lib/toplevel/attr#string_dict) | optional | - |
| cipd_tag | CIPD tag for the version to load. | [String](https://bazel.build/rules/lib/toplevel/attr#string) | optional | `""` |
| sha256 | Optional SHA-256 hash of the clang archive. Valid key is linux | [String Dict](https://bazel.build/rules/lib/toplevel/attr#string_dict) | optional | `{}` |
| local_archive | local clang archive file. | [String](https://bazel.build/rules/lib/toplevel/attr#string) | optional | `""` |
| local_path | local clang installation path, a full label, or relative to workspace dir | [String](https://bazel.build/rules/lib/toplevel/attr#string) | optional | `""` |
| from_workspace | Any label to a bazel external workspace containing a clang installation. | [Label](https://bazel.build/rules/lib/toplevel/attr#label) | optional | `None` |
| local_version_file | Optional path to a workspace-relative path to a version file for this clang installation. | [Label](https://bazel.build/rules/lib/toplevel/attr#label) | optional | `None` |
| sysroot_paths | sysroot paths by Bazel arch, relative to execroot | [String Dict](https://bazel.build/rules/lib/toplevel/attr#string_dict) | optional | `{"aarch64": "external/rules_fuchsia++fuchsia_sdk_ext+fuchsia_sdk/arch/arm64/sysroot", "x86_64": "external/rules_fuchsia++fuchsia_sdk_ext+fuchsia_sdk/arch/x64/sysroot", "riscv64": "external/rules_fuchsia++fuchsia_sdk_ext+fuchsia_sdk/arch/riscv64/sysroot"}` |
| sysroot_headers | Sysroot headers filegroups by Bazel arch. These will be added to compiler files of cc_toolchain. Values should be labels pointing to filegroups covering all the headers that must appear in the sandbox of C++ compilation actions. See default value for example. | [String Dict](https://bazel.build/rules/lib/toplevel/attr#string_dict) | optional | `{"aarch64": "@fuchsia_sdk//:fuchsia-sysroot-headers-aarch64", "x86_64": "@fuchsia_sdk//:fuchsia-sysroot-headers-x86_64", "riscv64": "@fuchsia_sdk//:fuchsia-sysroot-headers-riscv64"}` |
| sysroot_libs | Sysroot libraries filegroups by Bazel arch. These will be added to linker files of cc_toolchain. Values should be labels pointing to filegroups covering all the libraries that must appear in the sandbox of C++ linking actions. See default value for example. | [String Dict](https://bazel.build/rules/lib/toplevel/attr#string_dict) | optional | `{"aarch64": "@fuchsia_sdk//:fuchsia-sysroot-libraries-aarch64", "x86_64": "@fuchsia_sdk//:fuchsia-sysroot-libraries-x86_64", "riscv64": "@fuchsia_sdk//:fuchsia-sysroot-libraries-riscv64"}` |
| extra_target_compatible_with | An optional list of extra platform constraint values that the toolchain must match. This is only useful for the Fuchsia in-tree build that also generates Fuchsia binaries using a different Fuchsia-specific toolchain that cannot rely on SDK sysroots. | [Label List](https://bazel.build/rules/lib/toplevel/attr#label_list) | optional | `[]` |
| cipd_ensure_file | A cipd ensure file to use to download clang. | [Label](https://bazel.build/rules/lib/toplevel/attr#label) | optional | `None` |
| cipd_bin | The cipd binary that will be used to fetch the `cipd_ensure_file`. | [Label](https://bazel.build/rules/lib/toplevel/attr#label) | optional | `None` |

## **ENVIRONMENT VARIABLES**

This repository rule depends on the following environment variables:

- `LOCAL_FUCHSIA_PLATFORM_BUILD`\* `LOCAL_FUCHSIA_CLANG_VERSION_FILE`