# RISC-V-only clang and lld toolchain ships for CH32 Arduino core

> **Key takeaway:** A purpose-built LLVM toolchain with only the RISC-V backend enables CH32 microcontroller development in the Arduino IDE without multi-architecture compiler bloat.

**Published:** 2026-11-11T16:58:57+00:00 
**Source:** Adafruit Electronics 
**Category:** open-hardware 
**Canonical URL:** https://fosswire.org/news/risc-v-only-clang-and-lld-toolchain-ships-for-ch32-arduino-c.html 

## Summary
Developer tanakamasayuki has released ch32rv-clang, a stripped-down build of clang and the lld linker containing solely the RISC-V backend, targeting the CH32 family of RISC-V microcontrollers. The toolchain is distributed as versioned archives built through GitHub Actions for multiple host platforms, and integrates with the ArduinoCore-CH32RV project via the Arduino Boards Manager. Because the archive excludes both a C library and compiler runtime, the Arduino core currently links against newlib-nano and libgcc from the xPack GNU RISC-V Embedded GCC distribution.

The toolchain supports WCH's proprietary QingKe XW compressed instruction extension, which LLVM implements as the Xwchc extension starting from version 19. The Arduino core maintains a chip compatibility database to prevent XW instructions from being emitted for incompatible parts such as the QingKe V3A and V4A, where they would cause immediate execution faults. Build scripts carry the MIT license, while the compiled LLVM components are distributed under Apache 2.0 with LLVM Exceptions.

## Toolchain architecture and CH32 integration
- **Single-backend LLVM build:** The toolchain compiles only the RISC-V target from upstream LLVM, eliminating other architectures to reduce distribution size and build complexity.
- **Missing runtime dependencies:** The distributed archives omit both a C library and compiler runtime; the Arduino core satisfies these by linking newlib-nano and libgcc from xPack GNU RISC-V Embedded GCC.
- **QingKe XW instruction support:** WCH's XW compressed instructions are handled through LLVM's Xwchc extension, available in LLVM 19 and later releases.
- **Chip-specific instruction safety:** The Arduino core tracks which CH32 parts implement XW; emitting these instructions on QingKe V3A or V4A cores causes programs to halt at the first encountered XW instruction.
- **Automated release infrastructure:** GitHub Actions builds archives for every supported host platform, with releases tagged by LLVM version and build number (e.g., v23.1.5-1) and accompanied by .sha256 checksum files.

## Why it matters
This toolchain reduces friction for developers working with WCH's low-cost CH32 RISC-V microcontrollers in the Arduino environment, a significant embedded segment where proprietary toolchains have dominated. By providing a clean upstream-LLVM-based path with automated builds and open licensing, it strengthens the open-source firmware pipeline for a growing class of RISC-V MCUs and reduces dependency on vendor-specific compiler distributions.