Skip to content

Allow the feature of O(1) bootstrapping to temporarily regress #6378

@andrewrk

Description

@andrewrk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThis proposal is planned.frontendTokenization, parsing, AstGen, Sema, and Liveness.proposalThis 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.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions