std.Build: use Step.* instead of *Step

Follow up to 13eb7251d3
This commit is contained in:
Veikka Tuominen
2023-05-03 11:49:55 +03:00
committed by Andrew Kelley
parent 5def162391
commit 3f3b1a6808
27 changed files with 379 additions and 361 deletions

View File

@@ -2,7 +2,7 @@ const std = @import("std");
const Step = std.Build.Step;
const FileSource = std.Build.FileSource;
const InstallDir = std.Build.InstallDir;
const InstallFileStep = @This();
const InstallFile = @This();
const assert = std.debug.assert;
pub const base_id = .install_file;
@@ -20,10 +20,10 @@ pub fn create(
source: FileSource,
dir: InstallDir,
dest_rel_path: []const u8,
) *InstallFileStep {
) *InstallFile {
assert(dest_rel_path.len != 0);
owner.pushInstalledFile(dir, dest_rel_path);
const self = owner.allocator.create(InstallFileStep) catch @panic("OOM");
const self = owner.allocator.create(InstallFile) catch @panic("OOM");
self.* = .{
.step = Step.init(.{
.id = base_id,
@@ -43,7 +43,7 @@ pub fn create(
fn make(step: *Step, prog_node: *std.Progress.Node) !void {
_ = prog_node;
const src_builder = step.owner;
const self = @fieldParentPtr(InstallFileStep, "step", step);
const self = @fieldParentPtr(InstallFile, "step", step);
const dest_builder = self.dest_builder;
const full_src_path = self.source.getPath2(src_builder, step);
const full_dest_path = dest_builder.getInstallPath(self.dir, self.dest_rel_path);