Add builtin.zig support

This commit is contained in:
Layne Gustafson
2020-01-08 21:35:26 -05:00
committed by Andrew Kelley
parent c61856ebcf
commit 03dd376b55
18 changed files with 3483 additions and 3426 deletions

View File

@@ -8607,6 +8607,14 @@ Buf *codegen_generate_builtin_source(CodeGen *g) {
"pub var test_functions: []TestFn = undefined; // overwritten later\n"
);
}
buf_appendf(contents, "pub const target_details: ?@import(\"std\").target.TargetDetails = ");
if (g->target_details) {
buf_appendf(contents, "%s", stage2_target_details_get_builtin_str(g->target_details));
} else {
buf_appendf(contents, "null;");
}
buf_appendf(contents, "\n");
return contents;
}