authorgravatar for n@nirf.deNick Erdmann <n@nirf.de> 2019-07-26 15:42:50+02:00
committergravatar for n@nirf.deNick Erdmann <n@nirf.de> 2019-07-29 00:21:21+02:00
log6e8ef5b6f2205ada3f2c1b4769aefdfc61aca39e
tree8abbdeedab7263cb8f8b99f27e447c3f4fd8b243
parent63d56c532d4485ff03f59ae0e79043e23bcc63d9
signature Commit is signed but in an unrecognized format.

std/build.zig: add checks for UEFI


1 files changed, 9 insertions(+), 2 deletions(-)

std/build.zig+9-2
......@@ -1174,6 +1174,13 @@ pub const Target = union(enum) {
11741174 };
11751175 }
11761176
1177 pub fn isUefi(self: Target) bool {
1178 return switch (self.getOs()) {
1179 .uefi => true,
1180 else => false,
1181 };
1182 }
1183
11771184 pub fn isWasm(self: Target) bool {
11781185 return switch (self.getArch()) {
11791186 .wasm32, .wasm64 => true,
......@@ -1484,7 +1491,7 @@ pub const LibExeObjStep = struct {
14841491 }
14851492
14861493 pub fn producesPdbFile(self: *LibExeObjStep) bool {
1487 if (!self.target.isWindows()) return false;
1494 if (!self.target.isWindows() and !self.target.isUefi()) return false;
14881495 if (self.strip) return false;
14891496 return self.isDynamicLibrary() or self.kind == .Exe;
14901497 }
......@@ -1581,7 +1588,7 @@ pub const LibExeObjStep = struct {
15811588 /// Unless setOutputDir was called, this function must be called only in
15821589 /// the make step, from a step that has declared a dependency on this one.
15831590 pub fn getOutputPdbPath(self: *LibExeObjStep) []const u8 {
1584 assert(self.target.isWindows());
1591 assert(self.target.isWindows() or self.target.isUefi());
15851592 return fs.path.join(
15861593 self.builder.allocator,
15871594 [_][]const u8{ self.output_dir.?, self.out_pdb_filename },