Compiler Bootstrapping
The cluster discusses the challenges and techniques of bootstrapping compilers, including the need for an existing compiler to build a new one, historical examples from languages like Rust, GCC, Zig, and Go, and methods like using assembly or previous versions.
Activity Over Time
Top Contributors
Keywords
Sample Comments
How are you bootstrapping a modern C compiler without an existing C/C++ compiler and linker?
Reminds me of compiler bootstrapping. If you only have the source code of, let's say, Rust and want to build it you first need to have a Rust compiler of a previous version. And for that you need another compiler. Then you reach times when rustc was written in OCaml. And know what? Now you need to build OCaml compiler!Other way is to build a stripped down version of rustc only capable of compiling latest rustc, e.g. using <a href="https://github.com/dtolnay/bootstrap"
Any plans to actually bootstrap the compiler?
AKA Bootstrapping: https://en.wikipedia.org/wiki/Bootstrapping_(compilers)
Related https://en.wikipedia.org/wiki/Bootstrapping_(compilers)
Compilers seem to manage just fine with bootstrapping themselves. The trick is not to overwrite yourself
Bootstrappinghttps://en.wikipedia.org/wiki/Bootstrapping_(compilers)
Bootstrapping any tool is going to look that way. To compile gcc you need a C compiler don't you?
How was this compiler bootstrapped?
I understand bootstrapping, but at some point there has to exist some outside compiler in another language or a hand-compiled version of this otherwise the chicken and egg chain never ends.