remove zig_is_stage2 from @import("builtin")

Instead use the standarized option for communicating the
zig compiler backend at comptime, which is `zig_backend`. This was
introduced in commit 1c24ef0d0b.
This commit is contained in:
Andrew Kelley
2022-01-17 21:55:49 -07:00
parent 84c2c47fae
commit 4d05f2ae5f
17 changed files with 20 additions and 23 deletions

View File

@@ -9392,7 +9392,7 @@ Buf *codegen_generate_builtin_source(CodeGen *g) {
buf_appendf(contents, "pub const position_independent_executable = %s;\n", bool_to_str(g->have_pie));
buf_appendf(contents, "pub const strip_debug_info = %s;\n", bool_to_str(g->strip_debug_symbols));
buf_appendf(contents, "pub const code_model = std.builtin.CodeModel.default;\n");
buf_appendf(contents, "pub const zig_is_stage2 = false;\n");
buf_appendf(contents, "pub const zig_backend = std.builtin.CompilerBackend.stage1;\n");
{
TargetSubsystem detected_subsystem = detect_subsystem(g);