Commit 9cb06f3b8b
lib/std/fs/wasi.zig
@@ -38,7 +38,7 @@ pub fn preopensAlloc(gpa: Allocator) Allocator.Error!Preopens {
var prestat: prestat_t = undefined;
switch (wasi.fd_prestat_get(fd, &prestat)) {
.SUCCESS => {},
- .OPNOTSUPP, .BADF => return .{ .names = names.toOwnedSlice(gpa) },
+ .OPNOTSUPP, .BADF => return .{ .names = try names.toOwnedSlice(gpa) },
else => @panic("fd_prestat_get: unexpected error"),
}
try names.ensureUnusedCapacity(gpa, 1);
src/main.zig
@@ -3087,6 +3087,7 @@ fn buildOutputType(
error.SemanticAnalyzeFail => if (!watch) process.exit(1),
else => |e| return e,
};
+ if (build_options.only_c) return cleanExit();
try comp.makeBinFileExecutable();
if (test_exec_args.items.len == 0 and object_format == .c) default_exec_args: {