authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-08-29 00:18:12+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-08-30 06:36:41+02:00
logfdd32a2257dcc1166ca95b296b226d50ad5ade32
tree0f79605371e39ff74d0c618742f944053cfef473
parent464eef390bf7abeb1a61cbd672c5ec82e65b59a6
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: add managarm OS tag


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

lib/compiler/aro/aro/target.zig+1
...@@ -667,6 +667,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {...@@ -667,6 +667,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
667 .driverkit => "driverkit",667 .driverkit => "driverkit",
668 .visionos => "xros",668 .visionos => "xros",
669 .serenity => "serenity",669 .serenity => "serenity",
670 .managarm => "managarm",
670 .opencl,671 .opencl,
671 .opengl,672 .opengl,
672 .vulkan,673 .vulkan,
lib/std/Target.zig+11
...@@ -22,6 +22,7 @@ pub const Os = struct {...@@ -22,6 +22,7 @@ pub const Os = struct {
22 contiki,22 contiki,
23 fuchsia,23 fuchsia,
24 hermit,24 hermit,
25 managarm,
2526
26 aix,27 aix,
27 haiku,28 haiku,
...@@ -158,6 +159,8 @@ pub const Os = struct {...@@ -158,6 +159,8 @@ pub const Os = struct {
158 .freestanding,159 .freestanding,
159 .other,160 .other,
160161
162 .managarm,
163
161 .haiku,164 .haiku,
162 .plan9,165 .plan9,
163 .serenity,166 .serenity,
...@@ -388,6 +391,8 @@ pub const Os = struct {...@@ -388,6 +391,8 @@ pub const Os = struct {
388 .freestanding,391 .freestanding,
389 .other,392 .other,
390393
394 .managarm,
395
391 .haiku,396 .haiku,
392 .plan9,397 .plan9,
393 .serenity,398 .serenity,
...@@ -895,6 +900,7 @@ pub const Abi = enum {...@@ -895,6 +900,7 @@ pub const Abi = enum {
895 .contiki,900 .contiki,
896 .fuchsia,901 .fuchsia,
897 .hermit,902 .hermit,
903 .managarm,
898 .plan9,904 .plan9,
899 .serenity,905 .serenity,
900 .zos,906 .zos,
...@@ -2094,6 +2100,7 @@ pub fn requiresLibC(target: *const Target) bool {...@@ -2094,6 +2100,7 @@ pub fn requiresLibC(target: *const Target) bool {
2094 .netbsd,2100 .netbsd,
2095 .freestanding,2101 .freestanding,
2096 .fuchsia,2102 .fuchsia,
2103 .managarm,
2097 .ps3,2104 .ps3,
2098 .zos,2105 .zos,
2099 .rtems,2106 .rtems,
...@@ -2206,6 +2213,7 @@ pub const DynamicLinker = struct {...@@ -2206,6 +2213,7 @@ pub const DynamicLinker = struct {
22062213
2207 .contiki,2214 .contiki,
2208 .hermit,2215 .hermit,
2216 .managarm, // Needs to be double-checked.
22092217
2210 .aix,2218 .aix,
2211 .plan9,2219 .plan9,
...@@ -2621,6 +2629,8 @@ pub const DynamicLinker = struct {...@@ -2621,6 +2629,8 @@ pub const DynamicLinker = struct {
26212629
2622 // TODO go over each item in this list and either move it to the above list, or2630 // TODO go over each item in this list and either move it to the above list, or
2623 // implement the standard dynamic linker path code for it.2631 // implement the standard dynamic linker path code for it.
2632 .managarm,
2633
2624 .ps3,2634 .ps3,
2625 .ps4,2635 .ps4,
2626 .ps5,2636 .ps5,
...@@ -3148,6 +3158,7 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) u16 {...@@ -3148,6 +3158,7 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) u16 {
31483158
3149 .ps3,3159 .ps3,
3150 .contiki,3160 .contiki,
3161 .managarm,
3151 .opengl,3162 .opengl,
3152 => @panic("specify the C integer and float type sizes for this OS"),3163 => @panic("specify the C integer and float type sizes for this OS"),
3153 }3164 }
src/codegen/llvm.zig+1
...@@ -230,6 +230,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8...@@ -230,6 +230,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
230 .visionos => "xros",230 .visionos => "xros",
231 .serenity => "serenity",231 .serenity => "serenity",
232 .vulkan => "vulkan",232 .vulkan => "vulkan",
233 .managarm => "managarm",
233234
234 .@"3ds",235 .@"3ds",
235 .opengl,236 .opengl,