move installation logic to the build script where it belongs #16486
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
build.zig: introduce
-Dflatoption which makes the installation match what we want to ship for our download tarballs. This allows deleting a bunch of shell script logic from the CI.build.zig: by default also install std lib documentation to doc/std/
-Dno-autodocssimilar to how there is already-Dno-langref.build.zig: add
std-docsandlangrefsteps which build and install the std lib autodocs and langref to prefix/doc/std and prefix/doc/langref.html, respectively.std.Build: implement proper handling of
-femit-docsusing the LazyPath system. This is a breaking change.EmitOptionfield instd.Build.Step.Compile(for example:emit_docs) lacksFileSourceintegration #16351frontend: fixed the handling of Autodocs with regards to caching and putting the artifacts in the proper location to integrate with the build system.
CI: delete the logic for autodocs since it is now handled by build.zig and is enabled by default.
zig buildcommands.CI: pass
-DZIG_NO_LIB=ON/-Dno-libexcept for the one command where we want to actually generate the langref and autodocs. Generating the langref takes 14 minutes right now (why?!) so we don't want to do that more times than necessary.Autodoc: fixed use of a global variable. It works fine as a local variable instead.
Autodoc: only do it when there are no compile errors
After this is merged, I can make the following diff to zig-bootstrap:
Then I can make the following diff to the website repository: