diff --git a/lib/std/Build.zig b/lib/std/Build.zig index ea22fde4ec..55d13dfd85 100644 --- a/lib/std/Build.zig +++ b/lib/std/Build.zig @@ -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}, ));