authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-06-02 14:58:52+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-08-05 01:52:02+02:00
log78f3aa0b179091fd72f0a2627aea92fd75b5f649
tree3f41783d9db97e2a0d57349b20872fd142e281e1
parent9243d1d975c93f68c9c73a6d7a235784e04b3087

compiler: mark redundant decls in @import("builtin") deprecated

ref https://github.com/ziglang/zig/issues/22267

1 files changed, 4 insertions(+), 0 deletions(-)

src/Builtin.zig+4
...@@ -64,7 +64,9 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro...@@ -64,7 +64,9 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro
64 \\pub const unwind_tables: std.lang.UnwindTables = .{f};64 \\pub const unwind_tables: std.lang.UnwindTables = .{f};
65 \\pub const is_test = {};65 \\pub const is_test = {};
66 \\pub const single_threaded = {};66 \\pub const single_threaded = {};
67 \\/// Deprecated; to be removed in 0.18.0. Use `target.abi` instead.
67 \\pub const abi: std.Target.Abi = .{f};68 \\pub const abi: std.Target.Abi = .{f};
69 \\/// Deprecated; to be removed in 0.18.0. Use `target.cpu` instead.
68 \\pub const cpu: std.Target.Cpu = .{{70 \\pub const cpu: std.Target.Cpu = .{{
69 \\ .arch = .{f},71 \\ .arch = .{f},
70 \\ .model = &std.Target.{f}.cpu.{f},72 \\ .model = &std.Target.{f}.cpu.{f},
...@@ -95,6 +97,7 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro...@@ -95,6 +97,7 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro
95 try buffer.print(97 try buffer.print(
96 \\ }}),98 \\ }}),
97 \\}};99 \\}};
100 \\/// Deprecated; to be removed in 0.18.0. Use `target.os` instead.
98 \\pub const os: std.Target.Os = .{{101 \\pub const os: std.Target.Os = .{{
99 \\ .tag = .{f},102 \\ .tag = .{f},
100 \\ .version_range = .{{103 \\ .version_range = .{{
...@@ -238,6 +241,7 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro...@@ -238,6 +241,7 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro
238 const link_libc = opts.link_libc;241 const link_libc = opts.link_libc;
239242
240 try buffer.print(243 try buffer.print(
244 \\/// Deprecated; to be removed in 0.18.0. Use `target.ofmt` instead.
241 \\pub const object_format: std.Target.ObjectFormat = .{f};245 \\pub const object_format: std.Target.ObjectFormat = .{f};
242 \\/// Deprecated, to be removed after 0.18.0246 \\/// Deprecated, to be removed after 0.18.0
243 \\pub const mode = optimize;247 \\pub const mode = optimize;