Re:Zig self hosted compiler is now capable of building itself
by dottedmag on Saturday April 16, 2022 @09:57AM
(#31052360)
C?
[ Parent
| on HN ]
Re:Zig self hosted compiler is now capable of building itself
by coder543 on Saturday April 16, 2022 @11:09AM
(#31052902)
A lot of popular C compilers are actually written (at least partially) in C++ these days.
Re:Zig self hosted compiler is now capable of building itself
by dottedmag on Sunday April 17, 2022 @04:01AM
(#31059322)
In this case, C++?
Re:Zig self hosted compiler is now capable of building itself
by kaba0 on Sunday April 17, 2022 @02:09PM
(#31062865)
https://guix.gnu.org/manual/en/html_node/Preparing-to-Use-th...
The Guix project likes bootstrappility very much. They basically host a tiny assembly C-compiler (only for a subset of C) which can compile a C compiler written in C for the whole subset that can bootstrap the whole ecosystem.
Re:Zig self hosted compiler is now capable of building itself
by dottedmag on Monday April 18, 2022 @10:24AM
(#31071051)
This link is better: https://savannah.nongnu.org/projects/stage0: bits to asm to C, and then everything else follows.
Re:Zig self hosted compiler is now capable of building itself
by viraptor on Saturday April 16, 2022 @10:16AM
(#31052515)
You're commenting on an article about Zig which became self-hosted and can compile C. (There's also lots of other C compilers available)
Re:Zig self hosted compiler is now capable of building itself
by dundarious on Saturday April 16, 2022 @10:43AM
(#31052710)
Zig compiles C/C++ by deferring the vast majority of the work to libclang, which is written in C++. Also note Zig is self-hosted when using the LLVM backend, which means deferring to C++ for much of the code generation. There is no "end-to-end Zig" self-hosted compiler yet, because the Zig native backends are not as near completion. See the creator's comment about the breakdown: https://news.ycombinator.com/item?id=31052234. (I'm excited about this progress, so this is not meant as any kind of knock on Zig, which I think is quite impressive)
But you're right that C is not a good example.