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-20 10:01:47+02:00
logb19d40063ef477d9eaca684f9c1b9ddb3a99ffa2
tree118fd9b2ee00457f6682fa394e2d352d4c793b96
parentf8f4abab9450704615a67a3f577345459ea6b718
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

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
......@@ -1245,6 +1245,9 @@ pub const Cpu = struct {
12451245 dependencies: Set,
12461246
12471247 /// A bit set of all the features.
1248 ///
1249 /// The typed features for a given `Target.Cpu.Arch` can be found in
1250 /// `@field(Target, @tagName(arch.family()))`.
12481251 pub const Set = struct {
12491252 ints: [usize_count]usize,
12501253
lib/std/Target/Query.zig+10
......@@ -18,9 +18,19 @@ cpu_arch: ?Target.Cpu.Arch = null,
1818cpu_model: CpuModel = .determined_by_arch_os,
1919
2020/// 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`.
2126cpu_features_add: Target.Cpu.Feature.Set = .empty,
2227
2328/// 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`.
2434cpu_features_sub: Target.Cpu.Feature.Set = .empty,
2535
2636/// `null` means native.