authorgravatar for carl@astholm.seCarl Åstholm <carl@astholm.se> 2024-03-02 23:32:44+01:00
committergravatar for carl@astholm.seCarl Åstholm <carl@astholm.se> 2024-04-07 15:34:46+02:00
logce71eb31dadd255b0560e4c7a837e255e0617a91
treee13c8fb43c965b259c6476dc741364e903ce7f46
parentff0bec60b73a4698cda39588ec98ef06b0ecb50e

Update `addInstallHeaderFile` to take a `LazyPath`


1 files changed, 9 insertions(+), 9 deletions(-)

lib/std/Build.zig+9-9
...@@ -1569,22 +1569,22 @@ pub fn addObjCopy(b: *Build, source: LazyPath, options: Step.ObjCopy.Options) *S...@@ -1569,22 +1569,22 @@ pub fn addObjCopy(b: *Build, source: LazyPath, options: Step.ObjCopy.Options) *S
1569}1569}
15701570
1571///`dest_rel_path` is relative to install prefix path1571///`dest_rel_path` is relative to install prefix path
1572pub fn addInstallFile(self: *Build, source: LazyPath, dest_rel_path: []const u8) *Step.InstallFile {1572pub fn addInstallFile(b: *Build, source: LazyPath, dest_rel_path: []const u8) *Step.InstallFile {
1573 return self.addInstallFileWithDir(source.dupe(self), .prefix, dest_rel_path);1573 return b.addInstallFileWithDir(source, .prefix, dest_rel_path);
1574}1574}
15751575
1576///`dest_rel_path` is relative to bin path1576///`dest_rel_path` is relative to bin path
1577pub fn addInstallBinFile(self: *Build, source: LazyPath, dest_rel_path: []const u8) *Step.InstallFile {1577pub fn addInstallBinFile(b: *Build, source: LazyPath, dest_rel_path: []const u8) *Step.InstallFile {
1578 return self.addInstallFileWithDir(source.dupe(self), .bin, dest_rel_path);1578 return b.addInstallFileWithDir(source, .bin, dest_rel_path);
1579}1579}
15801580
1581///`dest_rel_path` is relative to lib path1581///`dest_rel_path` is relative to lib path
1582pub fn addInstallLibFile(self: *Build, source: LazyPath, dest_rel_path: []const u8) *Step.InstallFile {1582pub fn addInstallLibFile(b: *Build, source: LazyPath, dest_rel_path: []const u8) *Step.InstallFile {
1583 return self.addInstallFileWithDir(source.dupe(self), .lib, dest_rel_path);1583 return b.addInstallFileWithDir(source, .lib, dest_rel_path);
1584}1584}
15851585
1586pub fn addInstallHeaderFile(b: *Build, src_path: []const u8, dest_rel_path: []const u8) *Step.InstallFile {1586pub fn addInstallHeaderFile(b: *Build, source: LazyPath, dest_rel_path: []const u8) *Step.InstallFile {
1587 return b.addInstallFileWithDir(.{ .path = src_path }, .header, dest_rel_path);1587 return b.addInstallFileWithDir(source, .header, dest_rel_path);
1588}1588}
15891589
1590pub fn addInstallFileWithDir(1590pub fn addInstallFileWithDir(
...@@ -1593,7 +1593,7 @@ pub fn addInstallFileWithDir(...@@ -1593,7 +1593,7 @@ pub fn addInstallFileWithDir(
1593 install_dir: InstallDir,1593 install_dir: InstallDir,
1594 dest_rel_path: []const u8,1594 dest_rel_path: []const u8,
1595) *Step.InstallFile {1595) *Step.InstallFile {
1596 return Step.InstallFile.create(self, source.dupe(self), install_dir, dest_rel_path);1596 return Step.InstallFile.create(self, source, install_dir, dest_rel_path);
1597}1597}
15981598
1599pub fn addInstallDirectory(self: *Build, options: Step.InstallDir.Options) *Step.InstallDir {1599pub fn addInstallDirectory(self: *Build, options: Step.InstallDir.Options) *Step.InstallDir {