aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-02-24 16:02:01 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-02-24 23:48:03 -0500
commit26196be344e971c26ed044a39b68d0420cd94b90 (patch)
tree7c8c69a6876d50e872dc036e7dbd845ce564c70a /lib/std/Build.zig
parent6398aabb87cc39ddbc4e8fd650545ffcc864f9a6 (diff)
downloadzig-26196be344e971c26ed044a39b68d0420cd94b90.tar.gz
zig-26196be344e971c26ed044a39b68d0420cd94b90.zip
rename std.Build.InstallRawStep to ObjCopyStep
And make it not do any installation, only objcopying. We already have install steps for doing installation. This commit also makes ObjCopyStep properly integrate with caching.
Diffstat (limited to 'lib/std/Build.zig')
-rw-r--r--lib/std/Build.zig15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/std/Build.zig b/lib/std/Build.zig
index 678120847f..26919962e3 100644
--- a/lib/std/Build.zig
+++ b/lib/std/Build.zig
@@ -37,7 +37,7 @@ pub const FmtStep = @import("Build/FmtStep.zig");
pub const InstallArtifactStep = @import("Build/InstallArtifactStep.zig");
pub const InstallDirStep = @import("Build/InstallDirStep.zig");
pub const InstallFileStep = @import("Build/InstallFileStep.zig");
-pub const InstallRawStep = @import("Build/InstallRawStep.zig");
+pub const ObjCopyStep = @import("Build/ObjCopyStep.zig");
pub const CompileStep = @import("Build/CompileStep.zig");
pub const LogStep = @import("Build/LogStep.zig");
pub const OptionsStep = @import("Build/OptionsStep.zig");
@@ -1254,11 +1254,8 @@ pub fn installLibFile(self: *Build, src_path: []const u8, dest_rel_path: []const
self.getInstallStep().dependOn(&self.addInstallFileWithDir(.{ .path = src_path }, .lib, dest_rel_path).step);
}
-/// Output format (BIN vs Intel HEX) determined by filename
-pub fn installRaw(self: *Build, artifact: *CompileStep, dest_filename: []const u8, options: InstallRawStep.CreateOptions) *InstallRawStep {
- const raw = self.addInstallRaw(artifact, dest_filename, options);
- self.getInstallStep().dependOn(&raw.step);
- return raw;
+pub fn addObjCopy(b: *Build, source: FileSource, options: ObjCopyStep.Options) *ObjCopyStep {
+ return ObjCopyStep.create(b, source, options);
}
///`dest_rel_path` is relative to install prefix path
@@ -1280,10 +1277,6 @@ pub fn addInstallHeaderFile(b: *Build, src_path: []const u8, dest_rel_path: []co
return b.addInstallFileWithDir(.{ .path = src_path }, .header, dest_rel_path);
}
-pub fn addInstallRaw(self: *Build, artifact: *CompileStep, dest_filename: []const u8, options: InstallRawStep.CreateOptions) *InstallRawStep {
- return InstallRawStep.create(self, artifact, dest_filename, options);
-}
-
pub fn addInstallFileWithDir(
self: *Build,
source: FileSource,
@@ -1771,7 +1764,7 @@ test {
_ = InstallArtifactStep;
_ = InstallDirStep;
_ = InstallFileStep;
- _ = InstallRawStep;
+ _ = ObjCopyStep;
_ = CompileStep;
_ = LogStep;
_ = OptionsStep;