//ll:toolchain.bzl#

Implements ll_toolchain and the internally used ll_bootstrap_toolchain.

ll_toolchain#

ll_toolchain(name, address_sanitizer, archiver, bitcode_linker, builtin_includes, c_driver,
             clang_tidy, clang_tidy_runner, compiler_runtime, cpp_abihdrs, cpp_abilib, cpp_driver,
             cpp_stdhdrs, cpp_stdlib, cuda_toolkit, hip_libraries, hipsycl_backends, hipsycl_hdrs,
             hipsycl_plugin, hipsycl_runtime, leak_sanitizer, linker, local_library_path,
             machine_code_tool, memory_sanitizer, offload_bundler, symbolizer, thread_sanitizer,
             undefined_behavior_sanitizer, unwind_library)

ATTRIBUTES

Name

Description

Type

Mandatory

Default

name

A unique name for this target.

Name

required

address_sanitizer

AddressSanitizer libraries.

List of labels

optional

[]

archiver

The archiver.

Label

optional

@llvm-project//llvm:llvm-ar

bitcode_linker

The linker for LLVM bitcode files. While llvm-ar is able to archive bitcode files into an archive, it cannot link them into a single bitcode file. We need llvm-link to do this.

Label

optional

@llvm-project//llvm:llvm-link

builtin_includes

Builtin header files. Defaults to @llvm-project//clang:builtin_headers_gen

Label

optional

@llvm-project//clang:builtin_headers_gen

c_driver

The C compiler driver.

Label

optional

@llvm-project//clang:clang

clang_tidy

The clang-tidy executable.

Label

optional

@llvm-project//clang-tools-extra/clang-tidy:clang-tidy

clang_tidy_runner

The run-clang-tidy.py wrapper script for clang-tidy. Enables multithreading.

Label

optional

@llvm-project//clang-tools-extra/clang-tidy:run-clang-tidy

compiler_runtime

The compiler runtime.

List of labels

optional

[]

cpp_abihdrs

The C++ ABI headers.

Label

optional

None

cpp_abilib

The C++ ABI library archive.

Label

optional

None

cpp_driver

The C++ compiler driver.

Label

optional

@llvm-project//clang:clang++

cpp_stdhdrs

The C++ standard library headers.

Label

optional

None

cpp_stdlib

The C++ standard library archive.

Label

optional

None

cuda_toolkit

CUDA toolkit files. rules_ll will still use clang as the CUDA device compiler. Building targets that make use of the CUDA libraries imply acceptance of their respective licenses.

List of labels

optional

[]

hip_libraries

HIP library files. rules_ll will use clang as the device compiler. Building targets that make use of the HIP toolkit implies acceptance of its license.

Using HIP for AMD devices implies the use of the ROCm stack and the acceptance of its licenses.

Using HIP for Nvidia devices implies use of the CUDA toolkit and the acceptance of its licenses.

List of labels

optional

[]

hipsycl_backends

TODO

List of labels

optional

[]

hipsycl_hdrs

TODO

List of labels

optional

[]

hipsycl_plugin

TODO

Label

optional

None

hipsycl_runtime

TODO

Label

optional

None

leak_sanitizer

LeakSanitizer libraries.

List of labels

optional

[]

linker

The linker.

Label

optional

@llvm-project//lld:lld

local_library_path

A symlink to the local library path. This is usually either /usr/lib64 or /usr/local/x86_64-linux-gnu.

Label

optional

@local_library_path//:local_library_path

machine_code_tool

The llvm-mc tool. Used for separarable compilation (CUDA/HIP).

Label

optional

@llvm-project//llvm:llvm-mc

memory_sanitizer

MemorySanitizer libraries.

List of labels

optional

[]

offload_bundler

Offload bundler used to bundle code objects for languages targeting multiple devices in a single source file, e.g. GPU code.

Label

optional

@llvm-project//clang:clang-offload-bundler

symbolizer

The llvm-symbolizer.

Label

optional

@llvm-project//llvm:llvm-symbolizer

thread_sanitizer

ThreadSanitizer libraries.

List of labels

optional

[]

undefined_behavior_sanitizer

UndefinedBehaviorSanitizer libraries.

List of labels

optional

[]

unwind_library

The unwinder library.

Label

optional

None