build: update for zig-0.12.0 release
Minor fixes for the header installation.
This commit is contained in:
parent
9f74aeb1d2
commit
e95f71abab
19
build.zig
19
build.zig
@ -58,12 +58,12 @@ const LibreSslLibs = struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (std.mem.endsWith(u8, child.basename, ".h")) {
|
if (std.mem.endsWith(u8, child.basename, ".h")) {
|
||||||
const full = try std.mem.concat(b.allocator, u8, &.{ base, child.path });
|
const full = b.pathJoin(&.{ base, child.path });
|
||||||
defer b.allocator.free(full);
|
|
||||||
|
|
||||||
self.libcrypto.installHeader(full, child.path);
|
const path = b.path(full);
|
||||||
self.libssl.installHeader(full, child.path);
|
self.libcrypto.installHeader(path, child.path);
|
||||||
self.libtls.installHeader(full, child.path);
|
self.libssl.installHeader(path, child.path);
|
||||||
|
self.libtls.installHeader(path, child.path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -229,14 +229,19 @@ pub fn libresslBuild(
|
|||||||
else => @panic("unsupported target OS"),
|
else => @panic("unsupported target OS"),
|
||||||
}
|
}
|
||||||
|
|
||||||
const conf_header = switch (tinfo.cpu.arch) {
|
const conf_header = b.path(switch (tinfo.cpu.arch) {
|
||||||
.aarch64, .aarch64_be, .aarch64_32 => source_header_prefix ++ "arch/aarch64/opensslconf.h",
|
.aarch64, .aarch64_be, .aarch64_32 => source_header_prefix ++ "arch/aarch64/opensslconf.h",
|
||||||
.x86 => source_header_prefix ++ "arch/i386/opensslconf.h",
|
.x86 => source_header_prefix ++ "arch/i386/opensslconf.h",
|
||||||
.riscv64 => source_header_prefix ++ "arch/riscv64/opensslconf.h",
|
.riscv64 => source_header_prefix ++ "arch/riscv64/opensslconf.h",
|
||||||
.x86_64 => source_header_prefix ++ "arch/amd64/opensslconf.h",
|
.x86_64 => source_header_prefix ++ "arch/amd64/opensslconf.h",
|
||||||
|
|
||||||
else => @panic("unsupported target CPU arch"),
|
else => @panic("unsupported target CPU arch"),
|
||||||
};
|
});
|
||||||
|
|
||||||
|
const install_conf = b.addInstallHeaderFile(conf_header, "openssl/opensslconf.h");
|
||||||
|
libressl_libs.libcrypto.step.dependOn(&install_conf.step);
|
||||||
|
libressl_libs.libssl.step.dependOn(&install_conf.step);
|
||||||
|
libressl_libs.libtls.step.dependOn(&install_conf.step);
|
||||||
|
|
||||||
libressl_libs.libcrypto.installHeader(conf_header, "openssl/opensslconf.h");
|
libressl_libs.libcrypto.installHeader(conf_header, "openssl/opensslconf.h");
|
||||||
libressl_libs.libssl.installHeader(conf_header, "openssl/opensslconf.h");
|
libressl_libs.libssl.installHeader(conf_header, "openssl/opensslconf.h");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user