add bootstrap.c for building from source without LLVM

When a zig compiler without LLVM extensions is satisfactory, this
greatly simplified build-from-source process can be used.

This could be useful for users who only want to contribute to the
standard library, for example.
This commit is contained in:
Andrew Kelley
2023-11-05 20:23:52 -07:00
parent 53500a5768
commit 621e89a863
2 changed files with 197 additions and 0 deletions

View File

@@ -64,6 +64,20 @@ For more options, tips, and troubleshooting, please see the
[Building Zig From Source](https://github.com/ziglang/zig/wiki/Building-Zig-From-Source)
page on the wiki.
## Building from Source without LLVM
If you don't need your Zig compiler to have LLVM extensions enabled, you can
follow these instructions instead.
In this case, the only system dependency is a C compiler.
```
cc -o bootstrap bootstrap.c
./bootstrap build
```
You can pass any options to this that you would pass to `zig build`.
## Contributing
Zig is Free and Open Source Software. We welcome bug reports and patches from