zig
zig copied to clipboard
std.Build+autodoc: allow configurable html, js and additional static files
As suggested in https://github.com/ziglang/zig/issues/19279#issuecomment-2043751183
The build system is kind of coupled with what autodoc emits since the filenames need to show up, but this enables custom index.html, main javascript file and extra static files.
Perhaps general "CopyFiles" and "CopyDirs" fields of the option struct could be used to avoid some filenames being forced. Let me know if that would be preferred.
Closes #19279
Also contains an extra commit changing the detect-cpu command to only be included when debug-extensions are enabled. The compiler already lists this command under debug_usage, so this is a fix of a previous (probable) copy paste error.