Build a C compiler in seven weeks with Claude Code
A developer used Claude Code to build kcc, a C compiler written in ARM64 assembly that can compile the Linux kernel and reproduce itself bit for bit. The work took seven weeks, 6 to 8 hours a day, and cost only the usual subscription of 100 dollars a month, with no extra credits.
Done with Claude CodeModerate
What was done
A developer used Claude Code to build kcc, a C compiler written in ARM64 assembly that can compile the Linux kernel and reproduce itself bit for bit. The work took seven weeks, 6 to 8 hours a day, and cost only the usual subscription of 100 dollars a month, with no extra credits. Other commenters asked whether the compiler was distilled from known compilers like gcc and clang, which the author denies, saying everything is verified against real software.
How to do it
- Paste the prompt into the tool, and replace the text in brackets with your own.
- Read the answer through. Do not send, delete or publish anything until you have seen it yourself.
- Check the original before you trust a figure, a name or a date.
Try it with Claude Code
Build a C compiler from scratch in [architecture] assembly that can compile the Linux kernel, verifying each part against how gcc and clang behave on real code rather than your own assumptions. Show me which tests passed and what code is changing before anything is written to the compiler's own source. You are done when the compiler compiles itself and reproduces itself bit for bit.
Replace text in brackets with your own.
Done when. The compiler compiles itself and reproduces itself bit for bit.
temo_pacheco ·