-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed as not planned
Closed as not planned
Copy link
Labels
breakingImplementing this issue could cause existing code to no longer compile or have different behavior.Implementing this issue could cause existing code to no longer compile or have different behavior.bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.zig build systemstd.Build, the build runner, `zig build` subcommand, package managementstd.Build, the build runner, `zig build` subcommand, package management
Description
zig/lib/std/Build/Step/Compile.zig
Lines 49 to 58 in b9fc0d2
emit_analysis: EmitOption = .default, | |
emit_asm: EmitOption = .default, | |
emit_bin: EmitOption = .default, | |
emit_docs: EmitOption = .default, | |
emit_implib: EmitOption = .default, | |
emit_llvm_bc: EmitOption = .default, | |
emit_llvm_ir: EmitOption = .default, | |
// Lots of things depend on emit_h having a consistent path, | |
// so it is not an EmitOption for now. | |
emit_h: bool = false, |
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 FileSource
which can then be used as inputs in other parts of the build system API.
As an example, getOutputSource
already does this for the CLI equivalent of -femit-bin
.
As a bonus, the build system should pass -fno-emit-bin
unless getOutputSource()
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 of getOutputSource()
to an Install Step.
Metadata
Metadata
Assignees
Labels
breakingImplementing this issue could cause existing code to no longer compile or have different behavior.Implementing this issue could cause existing code to no longer compile or have different behavior.bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.zig build systemstd.Build, the build runner, `zig build` subcommand, package managementstd.Build, the build runner, `zig build` subcommand, package management