main: call gcc to make out executable

tuple-inator
Luna 3 years ago
parent 88e505b524
commit 34481c8ea8

1
.gitignore vendored

@ -2,3 +2,4 @@ zig-cache/
*.bc
*.ll
*.o
*.out

@ -59,6 +59,13 @@ pub fn run(allocator: *std.mem.Allocator, slice: []const u8) !Result {
var cgen = codegen.Codegen.init(allocator, &ctx);
try cgen.gen(root);
var child = try std.ChildProcess.init(
[_][]const u8{ "gcc", "src/entry.c", "outpath.o", "-o", "a.out" },
allocator,
);
try child.spawn();
_ = try child.wait();
return Result.Ok;
}

Loading…
Cancel
Save