authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-10-30 09:44:02+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-11-01 06:23:59+01:00
logf89982bf53d04d4f8e65a449c261eff2a8539169
treef9e60d4ca92e3d6fd67fd8f82a8a7de5ba7799ed
parented68083d8f286f7df7b33865b96e4decbda7b864
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: Add semver min/max versions for a bunch of OSs.


1 files changed, 107 insertions(+), 32 deletions(-)

lib/std/Target.zig+107-32
...@@ -162,42 +162,35 @@ pub const Os = struct {...@@ -162,42 +162,35 @@ pub const Os = struct {
162 .freestanding,162 .freestanding,
163 .other,163 .other,
164164
165 .contiki,
166 .elfiamcu,165 .elfiamcu,
167 .fuchsia,
168 .hermit,
169166
170 .aix,
171 .haiku,167 .haiku,
172 .hurd,
173 .plan9,168 .plan9,
174 .rtems,
175 .serenity,169 .serenity,
176 .zos,
177170
178 // This should use semver once we determine the version history.171 // This should use semver once we determine the version history.
179 .bridgeos,172 .bridgeos,
180173
181 .illumos,174 .illumos,
182175
183 .uefi,
184
185 .ps3,176 .ps3,
186 .ps4,177 .ps4,
187 .ps5,178 .ps5,
188179
189 .emscripten,180 .emscripten,
190181
191 .amdhsa,
192 .amdpal,
193 .cuda,
194 .mesa3d,182 .mesa3d,
195 .nvcl,
196 .opencl, // TODO: OpenCL versions
197 .opengl, // TODO: GLSL versions
198 .vulkan,
199 => .none,183 => .none,
200184
185 .contiki,
186 .fuchsia,
187 .hermit,
188
189 .aix,
190 .hurd,
191 .rtems,
192 .zos,
193
201 .dragonfly,194 .dragonfly,
202 .freebsd,195 .freebsd,
203 .netbsd,196 .netbsd,
...@@ -212,7 +205,17 @@ pub const Os = struct {...@@ -212,7 +205,17 @@ pub const Os = struct {
212205
213 .solaris,206 .solaris,
214207
208 .uefi,
209
215 .wasi,210 .wasi,
211
212 .amdhsa,
213 .amdpal,
214 .cuda,
215 .nvcl,
216 .opencl,
217 .opengl,
218 .vulkan,
216 => .semver,219 => .semver,
217220
218 .linux => .linux,221 .linux => .linux,
...@@ -405,42 +408,57 @@ pub const Os = struct {...@@ -405,42 +408,57 @@ pub const Os = struct {
405 .freestanding,408 .freestanding,
406 .other,409 .other,
407410
408 .contiki,
409 .elfiamcu,411 .elfiamcu,
410 .fuchsia,
411 .hermit,
412412
413 .aix,
414 .haiku,413 .haiku,
415 .hurd,
416 .plan9,414 .plan9,
417 .rtems,
418 .serenity,415 .serenity,
419 .zos,
420416
421 // This should use semver once we determine the version history.417 // This should use semver once we determine the version history.
422 .bridgeos,418 .bridgeos,
423419
424 .illumos,420 .illumos,
425421
426 .uefi,
427
428 .ps3,422 .ps3,
429 .ps4,423 .ps4,
430 .ps5,424 .ps5,
431425
432 .emscripten,426 .emscripten,
433427
434 .amdhsa,
435 .amdpal,
436 .cuda,
437 .mesa3d,428 .mesa3d,
438 .nvcl,
439 .opencl, // TODO: OpenCL versions
440 .opengl, // TODO: GLSL versions
441 .vulkan,
442 => .{ .none = {} },429 => .{ .none = {} },
443430
431 .contiki => .{
432 .semver = .{
433 .min = .{ .major = 4, .minor = 0, .patch = 0 },
434 .max = .{ .major = 4, .minor = 9, .patch = 0 },
435 },
436 },
437 .fuchsia => .{
438 .semver = .{
439 .min = .{ .major = 1, .minor = 1, .patch = 0 },
440 .max = .{ .major = 20, .minor = 1, .patch = 0 },
441 },
442 },
443 .hermit => .{
444 .semver = .{
445 .min = .{ .major = 0, .minor = 4, .patch = 0 },
446 .max = .{ .major = 0, .minor = 8, .patch = 0 },
447 },
448 },
449
450 .aix => .{
451 .semver = .{
452 .min = .{ .major = 7, .minor = 2, .patch = 5 },
453 .max = .{ .major = 7, .minor = 3, .patch = 2 },
454 },
455 },
456 .hurd => .{
457 .semver = .{
458 .min = .{ .major = 0, .minor = 9, .patch = 0 },
459 .max = .{ .major = 0, .minor = 9, .patch = 0 },
460 },
461 },
444 .linux => .{462 .linux => .{
445 .linux = .{463 .linux = .{
446 .range = .{464 .range = .{
...@@ -464,6 +482,18 @@ pub const Os = struct {...@@ -464,6 +482,18 @@ pub const Os = struct {
464 },482 },
465 },483 },
466 },484 },
485 .rtems => .{
486 .semver = .{
487 .min = .{ .major = 5, .minor = 1, .patch = 0 },
488 .max = .{ .major = 5, .minor = 3, .patch = 0 },
489 },
490 },
491 .zos => .{
492 .semver = .{
493 .min = .{ .major = 2, .minor = 5, .patch = 0 },
494 .max = .{ .major = 3, .minor = 1, .patch = 0 },
495 },
496 },
467497
468 .dragonfly => .{498 .dragonfly => .{
469 .semver = .{499 .semver = .{
...@@ -540,6 +570,12 @@ pub const Os = struct {...@@ -540,6 +570,12 @@ pub const Os = struct {
540 .max = WindowsVersion.latest,570 .max = WindowsVersion.latest,
541 },571 },
542 },572 },
573 .uefi => .{
574 .semver = .{
575 .min = .{ .major = 2, .minor = 0, .patch = 0 },
576 .max = .{ .major = 2, .minor = 9, .patch = 0 },
577 },
578 },
543579
544 .wasi => .{580 .wasi => .{
545 .semver = .{581 .semver = .{
...@@ -547,6 +583,45 @@ pub const Os = struct {...@@ -547,6 +583,45 @@ pub const Os = struct {
547 .max = .{ .major = 0, .minor = 2, .patch = 2 },583 .max = .{ .major = 0, .minor = 2, .patch = 2 },
548 },584 },
549 },585 },
586
587 .amdhsa => .{
588 .semver = .{
589 .min = .{ .major = 5, .minor = 0, .patch = 2 },
590 .max = .{ .major = 6, .minor = 2, .patch = 2 },
591 },
592 },
593 .amdpal => .{
594 .semver = .{
595 .min = .{ .major = 1, .minor = 1, .patch = 0 },
596 .max = .{ .major = 3, .minor = 5, .patch = 0 },
597 },
598 },
599 .cuda => .{
600 .semver = .{
601 .min = .{ .major = 11, .minor = 0, .patch = 1 },
602 .max = .{ .major = 12, .minor = 6, .patch = 1 },
603 },
604 },
605 .nvcl,
606 .opencl,
607 => .{
608 .semver = .{
609 .min = .{ .major = 2, .minor = 2, .patch = 0 },
610 .max = .{ .major = 3, .minor = 0, .patch = 0 },
611 },
612 },
613 .opengl => .{
614 .semver = .{
615 .min = .{ .major = 4, .minor = 5, .patch = 0 },
616 .max = .{ .major = 4, .minor = 6, .patch = 0 },
617 },
618 },
619 .vulkan => .{
620 .semver = .{
621 .min = .{ .major = 1, .minor = 2, .patch = 0 },
622 .max = .{ .major = 1, .minor = 3, .patch = 0 },
623 },
624 },
550 };625 };
551 }626 }
552 };627 };