More consistent way to add build options modules #14979
Labels
breaking
Implementing this issue could cause existing code to no longer compile or have different 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
std.Build, the build runner, `zig build` subcommand, package management
Milestone
In the build system,
OptionsStep
s are a nice way to pass build variables to Zig code being built. But there is a small incongruity between how you do it forCompileStep
s and forModule
s.I think there could be a less confusing API. Possibilities:
addOptions
method to Module.addOptions
so that CompileStep and friends instead useexe.addModule("options", my_opts.createModule())
, closing the discrepancy.The text was updated successfully, but these errors were encountered: