authorgravatar for n@nirf.deNick Erdmann <n@nirf.de> 2019-10-18 20:11:28+02:00
committergravatar for n@nirf.deNick Erdmann <n@nirf.de> 2019-10-18 20:11:28+02:00
logc8dec5729cabb90fa56fad2b6d77171189e01703
tree031b34b33b9cba158d37876e6c26347c4775d9ac
parent8774b1d9478139a8da0f43c49fc33e01c74a6a3f
signaturelock-open Commit is signed but in an unrecognized format.

std/build: make subsystem configurable


1 files changed, 16 insertions(+), 0 deletions(-)

lib/std/build.zig+16
...@@ -1491,6 +1491,8 @@ pub const LibExeObjStep = struct {...@@ -1491,6 +1491,8 @@ pub const LibExeObjStep = struct {
1491 /// Position Independent Code1491 /// Position Independent Code
1492 force_pic: ?bool = null,1492 force_pic: ?bool = null,
14931493
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 }
23272329
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 {