Address review comments

This commit is contained in:
Jakub Konka 2020-11-06 11:57:53 +01:00
parent b7c3ebcb9e
commit ab69b89d52
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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});