| ... | @@ -2443,12 +2443,12 @@ pub const GeneratedFile = struct { | ... | @@ -2443,12 +2443,12 @@ pub const GeneratedFile = struct { |
| 2443 | /// The step that generates the file | 2443 | /// The step that generates the file |
| 2444 | step: *Step, | 2444 | step: *Step, |
| 2445 | | 2445 | |
| 2446 | /// The path to the generated file. Must be either absolute or relative to the build root. | 2446 | /// The path to the generated file. Must be either absolute or relative to the build runner cwd. |
| 2447 | /// This value must be set in the `fn make()` of the `step` and must not be `null` afterwards. | 2447 | /// This value must be set in the `fn make()` of the `step` and must not be `null` afterwards. |
| 2448 | path: ?[]const u8 = null, | 2448 | path: ?[]const u8 = null, |
| 2449 | | 2449 | |
| 2450 | pub fn getPath(gen: GeneratedFile) []const u8 { | 2450 | pub fn getPath(gen: GeneratedFile) []const u8 { |
| 2451 | return gen.step.owner.pathFromRoot(gen.path orelse std.debug.panic( | 2451 | return gen.step.owner.pathFromCwd(gen.path orelse std.debug.panic( |
| 2452 | "getPath() was called on a GeneratedFile that wasn't built yet. Is there a missing Step dependency on step '{s}'?", | 2452 | "getPath() was called on a GeneratedFile that wasn't built yet. Is there a missing Step dependency on step '{s}'?", |
| 2453 | .{gen.step.name}, | 2453 | .{gen.step.name}, |
| 2454 | )); | 2454 | )); |