The LLVM Exception to the Apache 2.0 License is an additional permission that addresses a specific concern about using LLVM's compiler runtime libraries in software projects.
The Core Problem It Solves
The Apache 2.0 License has a patent retaliation clause — if you sue anyone over patents, you lose your Apache 2.0 license to that software. This creates a problem for compiled software:
When LLVM's compiler runtime libraries (like compiler-rt, libc++, or libclang_rt) are linked into your binary, your compiled program technically contains Apache 2.0 licensed code. This would mean your users could theoretically lose their rights to run your software if they ever engaged in patent litigation — even unrelated litigation.
What the Exception Says
The LLVM Exception adds a clause that essentially says:
Code compiled by LLVM tools, or linked against LLVM runtime libraries, is not considered a "derivative work" of LLVM for the purposes of the Apache 2.0 license.
This means:
- Your compiled binary is not bound by Apache 2.0's terms, even though it contains LLVM runtime code
- Your users are not subject to the patent retaliation clause just because your software was compiled with LLVM
- It makes LLVM's runtimes behave more like a system library exception (similar to the GCC Runtime Library Exception)