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 {
14911491 /// Position Independent Code
14921492 force_pic: ?bool = null,
14931493
1494 subsystem: ?builtin.SubSystem = null,
1495
14941496 const LinkObject = union(enum) {
14951497 StaticPath: []const u8,
14961498 OtherStep: *LibExeObjStep,
......@@ -2325,6 +2327,20 @@ pub const LibExeObjStep = struct {
23252327 }
23262328 }
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
23282344 if (self.kind == Kind.Test) {
23292345 try builder.spawnChild(zig_args.toSliceConst());
23302346 } else {