mirror of
https://github.com/jedisct1/minisign.git
synced 2025-04-03 02:47:41 +03:00
Require Zig 0.14
This commit is contained in:
parent
c7d965e43a
commit
108ea640ba
1 changed files with 14 additions and 23 deletions
37
build.zig
37
build.zig
|
@ -15,35 +15,26 @@ pub fn build(b: *std.Build) !void {
|
||||||
.strip = true,
|
.strip = true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (builtin.zig_version.major == 0 and builtin.zig_version.minor < 14) {
|
||||||
|
@compileError("Building requires Zig 0.14.0 or later");
|
||||||
|
}
|
||||||
|
|
||||||
// fix Mach-O relocation
|
// fix Mach-O relocation
|
||||||
minisign.headerpad_max_install_names = true;
|
minisign.headerpad_max_install_names = true;
|
||||||
|
|
||||||
minisign.linkLibC();
|
minisign.linkLibC();
|
||||||
if (use_libzodium) {
|
if (use_libzodium) {
|
||||||
var libzodium = lib: {
|
var libzodium = lib: {
|
||||||
if (builtin.zig_version.major == 0 and builtin.zig_version.minor < 13) {
|
const libzodium_mod = b.createModule(.{
|
||||||
@compileError("Building requires Zig 0.13.0 or later");
|
.root_source_file = b.path("src/libzodium/libzodium.zig"),
|
||||||
}
|
.target = target,
|
||||||
if (builtin.zig_version.major == 0 and builtin.zig_version.minor == 13) {
|
.optimize = optimize,
|
||||||
break :lib b.addStaticLibrary(.{
|
});
|
||||||
.name = "zodium",
|
break :lib b.addStaticLibrary(.{
|
||||||
.strip = true,
|
.name = "zodium",
|
||||||
.root_source_file = b.path("src/libzodium/libzodium.zig"),
|
.root_module = libzodium_mod,
|
||||||
.target = target,
|
.strip = true,
|
||||||
.optimize = optimize,
|
});
|
||||||
});
|
|
||||||
} else {
|
|
||||||
const libzodium_mod = b.createModule(.{
|
|
||||||
.root_source_file = b.path("src/libzodium/libzodium.zig"),
|
|
||||||
.target = target,
|
|
||||||
.optimize = optimize,
|
|
||||||
});
|
|
||||||
break :lib b.addStaticLibrary(.{
|
|
||||||
.name = "zodium",
|
|
||||||
.root_module = libzodium_mod,
|
|
||||||
.strip = true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
libzodium.linkLibC();
|
libzodium.linkLibC();
|
||||||
b.installArtifact(libzodium);
|
b.installArtifact(libzodium);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue