zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit ab69b89d528c828e949bb2d2f3632401a2d382fe (tree)
parent b7c3ebcb9e3aefbdd82a43c7ab122931787c7805
Author: Jakub Konka <kubkon@jakubkonka.com>
Date:   Fri,  6 Nov 2020 11:57:53 +0100

Address review comments

Diffstat:
Msrc/Compilation.zig | 2+-
Msrc/link/MachO.zig | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Compilation.zig b/src/Compilation.zig @@ -480,7 +480,7 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { const darwin_options: DarwinOptions = if (build_options.have_llvm and comptime std.Target.current.isDarwin()) outer: { const opts: DarwinOptions = if (use_lld and options.is_native_os and options.target.isDarwin()) inner: { const syslibroot = try std.zig.system.getSDKPath(arena); - const system_linker_hack = if (std.os.getenv("ZIG_SYSTEM_LINKER_HACK")) |_| true else false; + const system_linker_hack = std.os.getenv("ZIG_SYSTEM_LINKER_HACK") != null; break :inner .{ .syslibroot = syslibroot, .system_linker_hack = system_linker_hack, diff --git a/src/link/MachO.zig b/src/link/MachO.zig @@ -726,7 +726,7 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void { if (result.stderr.len != 0) { std.log.warn("unexpected LD stderr: {}", .{result.stderr}); } - if (result.term.Exited != 0) { + if (result.term != .Exited or result.term.Exited != 0) { // TODO parse this output and surface with the Compilation API rather than // directly outputting to stderr here. std.debug.print("{}", .{result.stderr});