authorgravatar for mattnite@protonmail.comMatt Knight <mattnite@protonmail.com> 2021-11-07 10:28:25-08:00
committergravatar for mattnite@protonmail.comMatt Knight <mattnite@protonmail.com> 2021-11-07 10:28:25-08:00
loga53becc034fc9447843286d140780e25d29c07d4
treef5d062e5bd773c65fc402aae98fb330d57af23c9
parent0fb26b03690eb327164bbc7a21ba2d69d3b1a5b8

don't invoke linker when just building an object


1 files changed, 4 insertions(+), 0 deletions(-)

src/link.zig+4
......@@ -474,6 +474,10 @@ pub const File = struct {
474474 try fs.cwd().copyFile(cached_pp_file_path, fs.cwd(), full_out_path, .{});
475475 return;
476476 }
477
478 if (base.options.output_mode == .Obj)
479 return;
480
477481 const use_lld = build_options.have_llvm and base.options.use_lld;
478482 if (use_lld and base.options.output_mode == .Lib and base.options.link_mode == .Static) {
479483 return base.linkAsArchive(comp);