| ... | @@ -1491,6 +1491,8 @@ pub const LibExeObjStep = struct { | ... | @@ -1491,6 +1491,8 @@ pub const LibExeObjStep = struct { |
| 1491 | /// Position Independent Code | 1491 | /// Position Independent Code |
| 1492 | force_pic: ?bool = null, | 1492 | force_pic: ?bool = null, |
| 1493 | | 1493 | |
| | 1494 | subsystem: ?builtin.SubSystem = null, |
| | 1495 | |
| 1494 | const LinkObject = union(enum) { | 1496 | const LinkObject = union(enum) { |
| 1495 | StaticPath: []const u8, | 1497 | StaticPath: []const u8, |
| 1496 | OtherStep: *LibExeObjStep, | 1498 | OtherStep: *LibExeObjStep, |
| ... | @@ -2325,6 +2327,20 @@ pub const LibExeObjStep = struct { | ... | @@ -2325,6 +2327,20 @@ pub const LibExeObjStep = struct { |
| 2325 | } | 2327 | } |
| 2326 | } | 2328 | } |
| 2327 | | 2329 | |
| | 2330 | if (self.subsystem) |subsystem| { |
| | 2331 | try zig_args.append("--subsystem"); |
| | 2332 | try zig_args.append(switch (subsystem) { |
| | 2333 | .Console => "console", |
| | 2334 | .Windows => "windows", |
| | 2335 | .Posix => "posix", |
| | 2336 | .Native => "native", |
| | 2337 | .EfiApplication => "efi_application", |
| | 2338 | .EfiBootServiceDriver => "efi_boot_service_driver", |
| | 2339 | .EfiRom => "efi_rom", |
| | 2340 | .EfiRuntimeDriver => "efi_runtime_driver", |
| | 2341 | }); |
| | 2342 | } |
| | 2343 | |
| 2328 | if (self.kind == Kind.Test) { | 2344 | if (self.kind == Kind.Test) { |
| 2329 | try builder.spawnChild(zig_args.toSliceConst()); | 2345 | try builder.spawnChild(zig_args.toSliceConst()); |
| 2330 | } else { | 2346 | } else { |