aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 760284a2e2..4aa71f32c7 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -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;
}