| ... | @@ -1,37 +1,14 @@ | ... | @@ -1,37 +1,14 @@ |
| 1 | const builtin = @import("builtin"); | 1 | const builtin = @import("builtin"); |
| 2 | | 2 | |
| 3 | // TODO delete these after releasing 0.9.0 | | |
| 4 | | | |
| 5 | pub const zig_version = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 6 | pub const zig_is_stage2 = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 7 | pub const output_mode = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 8 | pub const link_mode = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 9 | pub const is_test = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 10 | pub const single_threaded = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 11 | pub const abi = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 12 | pub const cpu = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 13 | pub const os = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 14 | pub const target = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 15 | pub const object_format = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 16 | pub const mode = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 17 | pub const link_libc = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 18 | pub const link_libcpp = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 19 | pub const have_error_return_tracing = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 20 | pub const valgrind_support = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 21 | pub const position_independent_code = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 22 | pub const position_independent_executable = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 23 | pub const strip_debug_info = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 24 | pub const code_model = @compileError("get this from @import(\"builtin\") instead of std.builtin"); | | |
| 25 | | | |
| 26 | /// `explicit_subsystem` is missing when the subsystem is automatically detected, | 3 | /// `explicit_subsystem` is missing when the subsystem is automatically detected, |
| 27 | /// so Zig standard library has the subsystem detection logic here. This should generally be | 4 | /// so Zig standard library has the subsystem detection logic here. This should generally be |
| 28 | /// used rather than `explicit_subsystem`. | 5 | /// used rather than `explicit_subsystem`. |
| 29 | /// On non-Windows targets, this is `null`. | 6 | /// On non-Windows targets, this is `null`. |
| 30 | pub const subsystem: ?std.Target.SubSystem = blk: { | 7 | pub const subsystem: ?std.Target.SubSystem = blk: { |
| 31 | if (@hasDecl(builtin, "explicit_subsystem")) break :blk builtin.explicit_subsystem; | 8 | if (@hasDecl(builtin, "explicit_subsystem")) break :blk builtin.explicit_subsystem; |
| 32 | switch (os.tag) { | 9 | switch (builtin.os.tag) { |
| 33 | .windows => { | 10 | .windows => { |
| 34 | if (is_test) { | 11 | if (builtin.is_test) { |
| 35 | break :blk std.Target.SubSystem.Console; | 12 | break :blk std.Target.SubSystem.Console; |
| 36 | } | 13 | } |
| 37 | if (@hasDecl(root, "main") or | 14 | if (@hasDecl(root, "main") or |