aboutsummaryrefslogtreecommitdiff
path: root/lib/std/build/LibExeObjStep.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-01-17 08:10:36 -0500
committerGitHub <noreply@github.com>2023-01-17 08:10:36 -0500
commitf3107e2cb2b0fb3c97ce4c567d670134b91b400c (patch)
treea1e1fa351321ef979a3e0b3fb16b868f967a8a7d /lib/std/build/LibExeObjStep.zig
parentf4b4e570d87c53d31cb4bee27b0468bdc8b826ae (diff)
parent65586b9869f2f4ed9dfb4d90d6cad3f3e9912f79 (diff)
downloadzig-f3107e2cb2b0fb3c97ce4c567d670134b91b400c.tar.gz
zig-f3107e2cb2b0fb3c97ce4c567d670134b91b400c.zip
Merge pull request #14344 from ziglang/config-header-step
zig build: enhance LibExeObjStep and ConfigHeaderStep
Diffstat (limited to 'lib/std/build/LibExeObjStep.zig')
-rw-r--r--lib/std/build/LibExeObjStep.zig7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/std/build/LibExeObjStep.zig b/lib/std/build/LibExeObjStep.zig
index ae7cb2a773..3dc800e77c 100644
--- a/lib/std/build/LibExeObjStep.zig
+++ b/lib/std/build/LibExeObjStep.zig
@@ -474,9 +474,8 @@ pub fn installRaw(self: *LibExeObjStep, dest_filename: []const u8, options: Inst
return self.builder.installRaw(self, dest_filename, options);
}
-pub fn installHeader(a: *LibExeObjStep, src_path: []const u8) void {
- const basename = fs.path.basename(src_path);
- const install_file = a.builder.addInstallHeaderFile(src_path, basename);
+pub fn installHeader(a: *LibExeObjStep, src_path: []const u8, dest_rel_path: []const u8) void {
+ const install_file = a.builder.addInstallHeaderFile(src_path, dest_rel_path);
a.builder.getInstallStep().dependOn(&install_file.step);
a.installed_headers.append(&install_file.step) catch unreachable;
}
@@ -486,7 +485,7 @@ pub fn installHeadersDirectory(
src_dir_path: []const u8,
dest_rel_path: []const u8,
) void {
- return a.builder.addInstallDirectoryOptions(.{
+ return installHeadersDirectoryOptions(a, .{
.source_dir = src_dir_path,
.install_dir = .header,
.install_subdir = dest_rel_path,