Description
xcc is a standalone C compiler toolchain that runs on Linux or macOS. It includes its own compiler, preprocessor, assembler, linker and libc, and it produces ELF64 binaries. The README lists x86-64, aarch64 (arm64), riscv64 and WebAssembly as supported architectures. To build it you need Linux or macOS, gcc or clang, and make. The build produces xcc (the compiler entry point), cpp (the preprocessor), cc1 (the C compiler), as (the assembler) and ld (the linker). Its command-line options include -o for the output file, -I for include paths, -D for macros, -S for assembly output, -E to preprocess only, -c for object files, and -nodefaultlibs or -nostdlib to skip the libc and startup code. A separate wcc tool compiles C to WebAssembly and WASI binaries, with options for the entry point, exported functions and stack size. The README says a WASM runtime such as Wasmtime or Wasmer can run the output, and it lists limits such as goto, which can only jump to an ancestor or a later line. The TODO list includes optimization and an archiver.…
Highlights
- Own compiler, assembler, linker and libc
- x86-64, aarch64, riscv64 and WebAssembly
- wcc compiles C to WASI binaries
- Built with make using gcc or clang
Ratings & Reviews
No ratings yet
Be the first to rate XCC.
People also visit
Raspberry Pi Cross Compilers
Latest GCC Cross Compiler & Native (ARM & ARM64) CI generated precompiled…
XCC FAQ
What is xcc?
A standalone C compiler, assembler, linker and libc for Linux and macOS.
Which architectures are supported?
x86-64, aarch64 (arm64), riscv64 and WebAssembly, producing ELF64 binaries.
What do I need to build it?
Linux or macOS, gcc or clang, and make.
Can it compile to WebAssembly?
Yes. The wcc tool compiles C to WebAssembly and WASI binaries, and the README links an online demo.
What are the known limits?
Optimization and an archiver are on the TODO list. In the WebAssembly compiler, goto can only jump to an ancestor or a later line.
What are the best XCC alternatives?
Popular alternatives to XCC include Shecc, wasup and Amacc. See all XCC alternatives

