From 2648e3651eb3025d6ea958e269f4cb8b8786ce07 Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Sat, 4 May 2024 11:03:45 -0400 Subject: [PATCH] link: restore lost passthrough behavior Fixes bug introduced by 3b5be9fb6e06f6494ca05fb087a2121e220beb3f --- src/link.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/link.zig b/src/link.zig index ae61e76ebf..8aec0799e2 100644 --- a/src/link.zig +++ b/src/link.zig @@ -1081,10 +1081,12 @@ pub fn spawnLld( switch (term) { .Exited => |code| if (code != 0) { + if (comp.clang_passthrough_mode) std.process.exit(code); comp.lockAndParseLldStderr(argv[1], stderr); return error.LLDReportedFailure; }, else => { + if (comp.clang_passthrough_mode) std.process.abort(); log.err("{s} terminated with stderr:\n{s}", .{ argv[0], stderr }); return error.LLDCrashed; },