mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Update for zig-current
This commit is contained in:
@@ -170,12 +170,14 @@ fn initLibConfig(b: *std.Build, target: std.Build.ResolvedTarget, lib: *Compile)
|
||||
|
||||
pub fn build(b: *std.Build) !void {
|
||||
const io: Io = if (is_zig_16) b.graph.io else {};
|
||||
const root_path = b.pathFromRoot(".");
|
||||
const cwd = try if (is_zig_16) Dir.cwd().openDir(io, root_path, .{}) else std.fs.cwd().openDir(root_path, .{});
|
||||
const cwd = if (is_zig_16)
|
||||
try b.root.openDir(io, ".", .{})
|
||||
else
|
||||
try std.fs.cwd().openDir(b.build_root.path orelse ".", .{});
|
||||
|
||||
const src_path = "src/libsodium";
|
||||
const src_dir = if (is_zig_16)
|
||||
try cwd.openDir(io, src_path, .{ .iterate = true })
|
||||
try b.root.openDir(io, src_path, .{ .iterate = true })
|
||||
else if (@hasField(Dir.OpenOptions, "follow_symlinks"))
|
||||
try cwd.openDir(src_path, .{ .iterate = true, .follow_symlinks = false })
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user