Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/std/Build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2443,12 +2443,12 @@ pub const GeneratedFile = struct {
/// The step that generates the file
step: *Step,

/// The path to the generated file. Must be either absolute or relative to the build root.
/// The path to the generated file. Must be either absolute or relative to the build runner cwd.
/// This value must be set in the `fn make()` of the `step` and must not be `null` afterwards.
path: ?[]const u8 = null,

pub fn getPath(gen: GeneratedFile) []const u8 {
return gen.step.owner.pathFromRoot(gen.path orelse std.debug.panic(
return gen.step.owner.pathFromCwd(gen.path orelse std.debug.panic(
"getPath() was called on a GeneratedFile that wasn't built yet. Is there a missing Step dependency on step '{s}'?",
.{gen.step.name},
));
Expand Down
Loading