authorgravatar for paladyneshadow@gmail.comVoxell Paladynee <paladyneshadow@gmail.com> 2026-10-18 22:07:40+03:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-19 03:57:07+02:00
loga7f35c766b03f111c906e7af410b34d063e4bf62
treebd07315eb01191692165241686641e014359c831
parentfd0dd6c2a8f98fdb8413f04f90cebe704f429f49

updated documentation for std.Target.Query and std.Target.Cpu.Feature.Set to point to existing feature sets in std\n\nthe motivation for this change was the issue codeberg#37309 and the feature presets living in another namespace than std.Target.Cpu.Feature.Set.*, making it harder to find things around by looking around in the proximity.


2 files changed, 13 insertions(+), 0 deletions(-)

lib/std/Target.zig+3
...@@ -1228,6 +1228,9 @@ pub const Cpu = struct {...@@ -1228,6 +1228,9 @@ pub const Cpu = struct {
1228 dependencies: Set,1228 dependencies: Set,
12291229
1230 /// A bit set of all the features.1230 /// A bit set of all the features.
1231 ///
1232 /// The typed features for a given `Target.Cpu.Arch` can be found in
1233 /// `@field(Target, @tagName(arch.family()))`.
1231 pub const Set = struct {1234 pub const Set = struct {
1232 ints: [usize_count]usize,1235 ints: [usize_count]usize,
12331236
lib/std/Target/Query.zig+10
...@@ -18,9 +18,19 @@ cpu_arch: ?Target.Cpu.Arch = null,...@@ -18,9 +18,19 @@ cpu_arch: ?Target.Cpu.Arch = null,
18cpu_model: CpuModel = .determined_by_arch_os,18cpu_model: CpuModel = .determined_by_arch_os,
1919
20/// Sparse set of CPU features to add to the set from `cpu_model`.20/// Sparse set of CPU features to add to the set from `cpu_model`.
21///
22/// The typed features for a given `Target.Cpu.Arch` can be found in
23/// `@field(Target, @tagName(arch.family()))`.
24///
25/// For example, `std.Target.x86.cpu.x86_64_v3.features` or `std.Target.s390x.cpu.z13.features`.
21cpu_features_add: Target.Cpu.Feature.Set = .empty,26cpu_features_add: Target.Cpu.Feature.Set = .empty,
2227
23/// Sparse set of CPU features to remove from the set from `cpu_model`.28/// Sparse set of CPU features to remove from the set from `cpu_model`.
29///
30/// The typed features for a given `Target.Cpu.Arch` can be found in
31/// `@field(Target, @tagName(arch.family()))`.
32///
33/// For example, `std.Target.x86.cpu.x86_64_v3.features` or `std.Target.s390x.cpu.z13.features`.
24cpu_features_sub: Target.Cpu.Feature.Set = .empty,34cpu_features_sub: Target.Cpu.Feature.Set = .empty,
2535
26/// `null` means native.36/// `null` means native.