Software ecosystem

LLVM and Clang

CHERI Clang/LLVM and LLD extend the widely used compiler infrastructure with CHERI C/C++ language, code-generation and linking support for CHERI-MIPS, CHERI-RISC-V and Morello targets.

For
Developers and system architects
Last reviewed
2026-08-05
Review cycle
Review every 6 months

Why it matters

The compiler exposes assumptions during porting and produces the capability-aware binaries required by hybrid and pure-capability ABIs.

In brief

CHERI Clang/LLVM and LLD extend the widely used compiler infrastructure with CHERI C/C++ language, code-generation and linking support for CHERI-MIPS, CHERI-RISC-V and Morello targets. They are the primary toolchain path for much of the ecosystem.

Key considerations

1. Frontend

Use CHERI-aware diagnostics, builtins and language rules to make pointer and authority handling explicit.

2. Backend

Select the correct target, architecture revision and ABI for the platform.

3. Environment

Match compiler, linker, sysroot, runtime libraries, debugger and OS image—often through cheribuild or a provider SDK.

Evidence and caveats

Branches and target support differ. A toolchain built for one CHERI architecture or ABI is not a drop-in replacement for another.

Treat build, test, integration, upstream and maintained support as distinct states. Name the target and last verified date.

Primary routes

Where next

Build the maintained reference target, capture compiler version and target triple, and compile a warning-clean example.

Install a matched toolchain