GCC vs LLVM: Compiler Infrastructure

Both GCC (GNU Compiler Collection) and LLVM are written in C++. GCC is the older, traditionally Unix-focused compiler. LLVM is a modular, reusable compiler infrastructure used by Clang, Rust, Swift, Kotlin/Native, and many others.

GCC

GCC has been the primary open-source C/C++ compiler since 1987. It supports dozens of languages (C, C++, Fortran, Ada, Go, D) and targets hundreds of architectures. GCC is written in C++ (migrated from C in 2012) and is licensed under GPL.

LLVM

LLVM started as a research project at the University of Illinois in 2000. It provides a modular compiler infrastructure with a well-defined intermediate representation (LLVM IR). Languages that compile to LLVM IR can target any architecture LLVM supports.

Languages That Use LLVM

Key Differences

AspectGCCLLVM
LicenseGPLApache 2.0
ModularityMonolithicHighly modular
IRGIMPLE/RTLLLVM IR
JIT supportLimitedFirst-class (MCJIT)
Explore Compiler Relationships in Graph →