-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
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
Milestone
Description
Extracted from #14265.
Lines 314 to 323 in 7cb2f92
| fn applyArgs(b: *Builder, args: anytype) !void { | |
| // TODO this function is the way that a build.zig file communicates | |
| // options to its dependencies. It is the programmatic way to give | |
| // command line arguments to a build.zig script. | |
| _ = args; | |
| // TODO create a hash based on the args and the package hash, use this | |
| // to compute the install prefix. | |
| const install_prefix = b.pathJoin(&.{ b.cache_root, "pkg" }); | |
| b.resolveInstallPrefix(install_prefix, .{}); | |
| } |
The args parameter comes from the second argument passed to dependency, as in this example:
const libz_dep = b.dependency("libz", .{});
const libmp3lame_dep = b.dependency("libmp3lame", .{});It is meant to fulfill the options declared with b.option.
Metadata
Metadata
Assignees
Labels
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
Type
Projects
Status
Urgent Enhancements