build: Create the output directory if it doesn't exist

Fixes #5054
This commit is contained in:
LemonBoy 2020-04-16 10:03:42 +02:00 committed by Andrew Kelley
parent 4872311364
commit a4b1242f0a

View File

@ -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();