every EmitOption field in std.Build.Step.Compile (for example: emit_docs) lacks FileSource integration
#16351
Labels
breaking
Implementing this issue could cause existing code to no longer compile or have different behavior.
bug
Observed behavior contradicts documented or intended behavior
contributor friendly
This issue is limited in scope and/or knowledge of Zig internals.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
zig build system
Milestone


andrewrk commentedJul 7, 2023
zig/lib/std/Build/Step/Compile.zig
Lines 49 to 58 in b9fc0d2
Instead of passing strings directly to the Zig CLI, the build system API should have a function for adding emission of each of these artifacts which returns a
FileSourcewhich can then be used as inputs in other parts of the build system API.As an example,
getOutputSourcealready does this for the CLI equivalent of-femit-bin.As a bonus, the build system should pass
-fno-emit-binunlessgetOutputSource()is called on the Compile Step. This will happen automatically in the case of adding an install step for the build artifact, which passes the result ofgetOutputSource()to an Install Step.The text was updated successfully, but these errors were encountered: