-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Ability to control what Zig emits in build.zig #6871
Copy link
Copy link
Open
Labels
contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.docsenhancementSolving 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
Milestone
Metadata
Metadata
Assignees
Labels
contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.docsenhancementSolving 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
As far as I understand, right now you can't specify what Zig should emit in
build.zig. I'd like to have the equivalentbuild.zigconfig for the command:zig build-obj src/main.zig -femit-llvm-ir -fno-emit-binHere's what I have in my
build.zigAfter looking in
lib/std/build.zig, I think adding something like:Then in
makeeverything already seems setup to add the args!If this is something you'd like, I can submit a PR!