From ce71eb31dadd255b0560e4c7a837e255e0617a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl=20=C3=85stholm?= Date: Sat, 2 Mar 2024 23:32:44 +0100 Subject: [PATCH] Update `addInstallHeaderFile` to take a `LazyPath` --- lib/std/Build.zig | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/std/Build.zig b/lib/std/Build.zig index 5db70d5491..f0ef8b9a4a 100644 --- a/lib/std/Build.zig +++ b/lib/std/Build.zig @@ -1569,22 +1569,22 @@ pub fn addObjCopy(b: *Build, source: LazyPath, options: Step.ObjCopy.Options) *S } ///`dest_rel_path` is relative to install prefix path -pub fn addInstallFile(self: *Build, source: LazyPath, dest_rel_path: []const u8) *Step.InstallFile { - return self.addInstallFileWithDir(source.dupe(self), .prefix, dest_rel_path); +pub fn addInstallFile(b: *Build, source: LazyPath, dest_rel_path: []const u8) *Step.InstallFile { + return b.addInstallFileWithDir(source, .prefix, dest_rel_path); } ///`dest_rel_path` is relative to bin path -pub fn addInstallBinFile(self: *Build, source: LazyPath, dest_rel_path: []const u8) *Step.InstallFile { - return self.addInstallFileWithDir(source.dupe(self), .bin, dest_rel_path); +pub fn addInstallBinFile(b: *Build, source: LazyPath, dest_rel_path: []const u8) *Step.InstallFile { + return b.addInstallFileWithDir(source, .bin, dest_rel_path); } ///`dest_rel_path` is relative to lib path -pub fn addInstallLibFile(self: *Build, source: LazyPath, dest_rel_path: []const u8) *Step.InstallFile { - return self.addInstallFileWithDir(source.dupe(self), .lib, dest_rel_path); +pub fn addInstallLibFile(b: *Build, source: LazyPath, dest_rel_path: []const u8) *Step.InstallFile { + return b.addInstallFileWithDir(source, .lib, dest_rel_path); } -pub fn addInstallHeaderFile(b: *Build, src_path: []const u8, dest_rel_path: []const u8) *Step.InstallFile { - return b.addInstallFileWithDir(.{ .path = src_path }, .header, dest_rel_path); +pub fn addInstallHeaderFile(b: *Build, source: LazyPath, dest_rel_path: []const u8) *Step.InstallFile { + return b.addInstallFileWithDir(source, .header, dest_rel_path); } pub fn addInstallFileWithDir( @@ -1593,7 +1593,7 @@ pub fn addInstallFileWithDir( install_dir: InstallDir, dest_rel_path: []const u8, ) *Step.InstallFile { - return Step.InstallFile.create(self, source.dupe(self), install_dir, dest_rel_path); + return Step.InstallFile.create(self, source, install_dir, dest_rel_path); } pub fn addInstallDirectory(self: *Build, options: Step.InstallDir.Options) *Step.InstallDir {