From a4b1242f0aeaf785f6b05cb843bb2efc0e6e702d Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Thu, 16 Apr 2020 10:03:42 +0200 Subject: [PATCH] build: Create the output directory if it doesn't exist Fixes #5054 --- lib/std/build.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/std/build.zig b/lib/std/build.zig index f62448ea1c49a561778d82b76bd6bfc742055db0..0ff8ebdeacd62fc6eb4417453e4e64f2c64ca459 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -2155,6 +2155,9 @@ pub const LibExeObjStep = struct { var src_dir = try std.fs.cwd().openDir(build_output_dir, .{ .iterate = true }); defer src_dir.close(); + // Create the output directory if it doesn't exist. + try std.fs.cwd().makePath(output_dir); + var dest_dir = try std.fs.cwd().openDir(output_dir, .{}); defer dest_dir.close(); -- 2.54.0