aboutsummaryrefslogtreecommitdiff
path: root/src-self-hosted
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-12-06 18:22:52 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-12-06 18:22:52 -0500
commit18b8a625f55f1c9cd325ec1ffb8d6d666c440b86 (patch)
treee2edfd35ed9e87a844523c64e413cab1dad0dc01 /src-self-hosted
parent7c91a055c120f9fdad122aad294a40a37510a6a6 (diff)
downloadzig-18b8a625f55f1c9cd325ec1ffb8d6d666c440b86.tar.gz
zig-18b8a625f55f1c9cd325ec1ffb8d6d666c440b86.zip
upgrade to new args api
Diffstat (limited to 'src-self-hosted')
-rw-r--r--src-self-hosted/main.zig5
1 files changed, 4 insertions, 1 deletions
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);