diff options
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/builtin.zig | 2 | ||||
| -rw-r--r-- | lib/std/os.zig | 2 | ||||
| -rw-r--r-- | lib/std/special/c.zig | 4 | ||||
| -rw-r--r-- | lib/std/special/compiler_rt.zig | 8 | ||||
| -rw-r--r-- | lib/std/special/test_runner.zig | 2 | ||||
| -rw-r--r-- | lib/std/start.zig | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index c94651a92d..ba5801e936 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -753,7 +753,7 @@ pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace) noreturn @setCold(true); // Until self-hosted catches up with stage1 language features, we have a simpler // default panic function: - if (builtin.zig_is_stage2) { + if (builtin.zig_backend != .stage1) { while (true) { @breakpoint(); } diff --git a/lib/std/os.zig b/lib/std/os.zig index 7be8825fcc..03469cd47f 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -4973,7 +4973,7 @@ pub fn toPosixPath(file_path: []const u8) ![MAX_PATH_BYTES - 1:0]u8 { /// Until then, unexpected error tracing is disabled for the self-hosted compiler. /// TODO remove this once self-hosted is capable enough to handle printing and /// stack trace dumping. -pub const unexpected_error_tracing = !builtin.zig_is_stage2 and builtin.mode == .Debug; +pub const unexpected_error_tracing = builtin.zig_backend == .stage1 and builtin.mode == .Debug; pub const UnexpectedError = error{ /// The Operating System returned an undocumented error code. diff --git a/lib/std/special/c.zig b/lib/std/special/c.zig index a7821643da..bc6d03bffd 100644 --- a/lib/std/special/c.zig +++ b/lib/std/special/c.zig @@ -12,7 +12,7 @@ comptime { // When the self-hosted compiler is further along, all the logic from c_stage1.zig will // be migrated to this file and then c_stage1.zig will be deleted. Until then we have a // simpler implementation of c.zig that only uses features already implemented in self-hosted. - if (builtin.zig_is_stage2) { + if (builtin.zig_backend != .stage1) { @export(memset, .{ .name = "memset", .linkage = .Strong }); @export(memcpy, .{ .name = "memcpy", .linkage = .Strong }); } else { @@ -25,7 +25,7 @@ comptime { pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace) noreturn { @setCold(true); _ = error_return_trace; - if (builtin.zig_is_stage2) { + if (builtin.zig_backend != .stage1) { while (true) { @breakpoint(); } diff --git a/lib/std/special/compiler_rt.zig b/lib/std/special/compiler_rt.zig index d9dc4b2884..0cd7ca2418 100644 --- a/lib/std/special/compiler_rt.zig +++ b/lib/std/special/compiler_rt.zig @@ -23,7 +23,7 @@ const long_double_is_f128 = builtin.target.longDoubleIsF128(); comptime { // These files do their own comptime exporting logic. - if (!builtin.zig_is_stage2) { + if (builtin.zig_backend == .stage1) { _ = @import("compiler_rt/atomics.zig"); } _ = @import("compiler_rt/clear_cache.zig").clear_cache; @@ -186,7 +186,7 @@ comptime { //@export(__trunctfxf2, .{ .name = "__trunctfxf2", .linkage = linkage }); } - if (!builtin.zig_is_stage2) { + if (builtin.zig_backend == .stage1) { switch (arch) { .i386, .x86_64, @@ -301,7 +301,7 @@ comptime { const __floatunsisf = @import("compiler_rt/floatunsisf.zig").__floatunsisf; @export(__floatunsisf, .{ .name = "__floatunsisf", .linkage = linkage }); - if (!builtin.zig_is_stage2) { + if (builtin.zig_backend == .stage1) { const __floatundisf = @import("compiler_rt/floatundisf.zig").__floatundisf; @export(__floatundisf, .{ .name = "__floatundisf", .linkage = linkage }); } @@ -752,7 +752,7 @@ fn floorl(x: c_longdouble) callconv(.C) c_longdouble { pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace) noreturn { _ = error_return_trace; @setCold(true); - if (builtin.zig_is_stage2) { + if (builtin.zig_backend != .stage1) { while (true) { @breakpoint(); } diff --git a/lib/std/special/test_runner.zig b/lib/std/special/test_runner.zig index 76b309b795..22edaf7bed 100644 --- a/lib/std/special/test_runner.zig +++ b/lib/std/special/test_runner.zig @@ -23,7 +23,7 @@ fn processArgs() void { } pub fn main() void { - if (builtin.zig_is_stage2) { + if (builtin.zig_backend != .stage1) { return main2() catch @panic("test failure"); } processArgs(); diff --git a/lib/std/start.zig b/lib/std/start.zig index 1d3cad93d2..1d06e1eaf6 100644 --- a/lib/std/start.zig +++ b/lib/std/start.zig @@ -22,7 +22,7 @@ comptime { // The self-hosted compiler is not fully capable of handling all of this start.zig file. // Until then, we have simplified logic here for self-hosted. TODO remove this once // self-hosted is capable enough to handle all of the real start.zig logic. - if (builtin.zig_is_stage2) { + if (builtin.zig_backend != .stage1) { if (builtin.output_mode == .Exe) { if ((builtin.link_libc or builtin.object_format == .c) and @hasDecl(root, "main")) { if (@typeInfo(@TypeOf(root.main)).Fn.calling_convention != .C) { |
