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

@@ -213,7 +213,7 @@ test "packed struct field alignment" {
b: u32 align(1),
} = undefined;
};
const S = if (builtin.zig_is_stage2) Stage2 else Stage1;
const S = if (builtin.zig_backend != .stage1) Stage2 else Stage1;
try expect(@TypeOf(&S.baz.b) == *align(1) u32);
}