diff options
| -rw-r--r-- | src/Compilation.zig | 2 | ||||
| -rw-r--r-- | src/link/MachO.zig | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index b6f380ae60..36847f0437 100644 --- 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 index 391f490c1f..6fbd1265d5 100644 --- 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}); |
