# drh/lcc

The lcc retargetable ANSI C compiler

Repository: https://github.com/drh/lcc
Canonical: https://ross.abutalabs.com/products/lcc
Homepage: https://drh.github.io/lcc/
Language: C
License Family: other
Last push: 2024-10-06T03:38:10+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5814, "days_push": 696, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2612, forks 488 (observed 2026-08-28T04:07:04.358493+00:00)

## What it is
lcc is a retargetable ANSI C (C89) compiler with code generators for Alpha, SPARC, MIPS R3000, and x86. It is the companion to the book 'A Retargetable C Compiler: Design and Implementation' and includes full source code and a code-generator generator.

## Use cases
- compile ANSI C code for multiple CPU architectures
- study the source code of a complete production C compiler
- learn compiler design and retargetable code generation
- add a new backend target to a C compiler
- teach a compilers course with real-world code

## When to choose
- you need a small, readable C compiler to study or modify
- you want to retarget a C compiler to a new architecture
- you need a C89 compiler for teaching or research

## When to avoid
- you need modern C standards support (C99/C11/C17)
- you need a production compiler with active optimization development
- you require a project with an explicit open-source license

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: compiler, programming-language, developer-tools
- domain: compilers, programming-languages, developer-tools
- platform: windows, cross-platform, cli
- tags: retargetable-compiler, ansi-c, c89, code-generation, compiler-design, linux, macos

## Member repositories
- drh/lcc (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:04.358493+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:20:38.708947+00:00, confidence not recorded.
  - readme: https://github.com/drh/lcc (fetched 2026-08-28T04:07:04.358493+00:00, sha 7d178c5b5084)
  - homepage: https://drh.github.io/lcc/ (fetched 2026-08-29T10:03:27.642405+00:00, sha 0673191bd67d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
