std/build: make subsystem configurable
This commit is contained in:
parent
8774b1d947
commit
c8dec5729c
@ -1491,6 +1491,8 @@ pub const LibExeObjStep = struct {
|
|||||||
/// Position Independent Code
|
/// Position Independent Code
|
||||||
force_pic: ?bool = null,
|
force_pic: ?bool = null,
|
||||||
|
|
||||||
|
subsystem: ?builtin.SubSystem = null,
|
||||||
|
|
||||||
const LinkObject = union(enum) {
|
const LinkObject = union(enum) {
|
||||||
StaticPath: []const u8,
|
StaticPath: []const u8,
|
||||||
OtherStep: *LibExeObjStep,
|
OtherStep: *LibExeObjStep,
|
||||||
@ -2325,6 +2327,20 @@ pub const LibExeObjStep = struct {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (self.subsystem) |subsystem| {
|
||||||
|
try zig_args.append("--subsystem");
|
||||||
|
try zig_args.append(switch (subsystem) {
|
||||||
|
.Console => "console",
|
||||||
|
.Windows => "windows",
|
||||||
|
.Posix => "posix",
|
||||||
|
.Native => "native",
|
||||||
|
.EfiApplication => "efi_application",
|
||||||
|
.EfiBootServiceDriver => "efi_boot_service_driver",
|
||||||
|
.EfiRom => "efi_rom",
|
||||||
|
.EfiRuntimeDriver => "efi_runtime_driver",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (self.kind == Kind.Test) {
|
if (self.kind == Kind.Test) {
|
||||||
try builder.spawnChild(zig_args.toSliceConst());
|
try builder.spawnChild(zig_args.toSliceConst());
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user