From 18b8a625f55f1c9cd325ec1ffb8d6d666c440b86 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 6 Dec 2017 18:22:52 -0500 Subject: [PATCH] upgrade to new args api --- src-self-hosted/main.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src-self-hosted/main.zig b/src-self-hosted/main.zig index de44a4652f..c714a40af1 100644 --- a/src-self-hosted/main.zig +++ b/src-self-hosted/main.zig @@ -377,7 +377,10 @@ pub fn main2() -> %void { const allocator = &incrementing_allocator.allocator; - const target_file = "input.zig"; // TODO + const args = %return os.argsAlloc(allocator); + defer os.argsFree(allocator, args); + + const target_file = args[1]; const target_file_buf = %return io.readFileAlloc(target_file, allocator);