-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
acceptedThis proposal is planned.This proposal is planned.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.stage1The process of building from source via WebAssembly and the C backend.The process of building from source via WebAssembly and the C backend.
Milestone
Description
Related: #853
Right now the bootstrap repository can start with cmake, a C++ compiler, bash, and cross compile zig for all supported targets. It does this in a fixed number of steps, because the Zig compiler is currently in c++ code and depends on an LLVM backend.
This proposal is to allow this feature to regress for a period of time between now and 1.0, restoring the feature before 1.0.
What that regression would look like is:
- Finish implementing self-hosted (stage2) and pass all the behavior tests, std lib tests, and able to build itself.
- Finish the C backend.
- Use the C backend to generate a .c implementation of the self-hosted compiler
- Delete the stage1 c++ code and check that generated .c code into the zig source repository to make it easy to build zig. This does not count as bootstrapping because the generated .c code is not source code. It's more like committing a multi-target binary into source control.
- Exploit the fact that we only have 1 codebase for the zig compiler to iterate faster, solve bugs, finish the language, and approach 1.0. This is the main motivation for this proposal.
- Do further reduce bootstrapping dependencies by making stage1 output C rather than LLVM IR #5246 (comment)
- Release 1.0, with the O(1) bootstrapping feature restored.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
acceptedThis proposal is planned.This proposal is planned.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.stage1The process of building from source via WebAssembly and the C backend.The process of building from source via WebAssembly and the C backend.