aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/WriteFileStep.zig
AgeCommit message (Collapse)Author
2023-02-23std.Build.WriteFileStep: integrate with cache systemAndrew Kelley
And additionally support writing files to source files. This means a custom build step in zig's own build.zig is no longer needed for copying zig.h because it is handled by WriteFileStep.
2023-02-13std.Build: start using the cache system with RunStepAndrew Kelley
* Use std.Build.Cache.Directory instead of a string for storing the cache roots and build roots. * Set up a std.Build.Cache in build_runner.zig and use it in std.Build.RunStep for avoiding redundant work.
2023-02-05std.Build: enhancements to ConfigHeaderStepAndrew Kelley
Breaking API change to std.Build.addConfigHeader. It now uses an options struct. Introduce std.Build.CompileStep.installConfigHeader which also accepts an options struct. This is used to add a generated config file into the set of installed header files for a particular compilation artifact. std.Build.ConfigHeaderStep now additionally supports a "blank" style where a header is generated from scratch. It no longer exposes `output_dir`. Instead it exposes a FileSource via `output_file`. It now additionally accepts an `include_path` option which affects the include path of CompileStep when using the `#include` directive, as well as affecting the default installation subdirectory for header installation purposes. The hash used for the directory to store the generated config file now includes the contents of the generated file. This fixes possible race conditions when generating multiple header files simultaneously. The values hash table is now an array hash map, to preserve order for the "blank" use case. I also took the opportunity to remove output_dir from TranslateCStep and WriteFileStep. This is technically a breaking change, but it was always naughty to access these fields.
2023-01-31std.Build: avoid use of catch unreachableAndrew Kelley
Usage of `catch unreachable` in build scripts is completely harmless because build scripts are always run in Debug mode, however, it sets a poor example for beginners to learn from.
2023-01-31combine std.build and std.build.Builder into std.BuildAndrew Kelley
I've been wanting to do this for along time.