commit a4b1242f0aeaf785f6b05cb843bb2efc0e6e702d (tree)
parent 48723113642f553db5dda1020eeb32a0e9df9cc0
Author: LemonBoy <thatlemon@gmail.com>
Date: Thu, 16 Apr 2020 10:03:42 +0200
build: Create the output directory if it doesn't exist
Fixes #5054
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git 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();