don't invoke linker when just building an object

This commit is contained in:
Matt Knight 2021-11-07 10:28:25 -08:00
parent 0fb26b0369
commit a53becc034

View File

@ -474,6 +474,10 @@ pub const File = struct {
try fs.cwd().copyFile(cached_pp_file_path, fs.cwd(), full_out_path, .{});
return;
}
if (base.options.output_mode == .Obj)
return;
const use_lld = build_options.have_llvm and base.options.use_lld;
if (use_lld and base.options.output_mode == .Lib and base.options.link_mode == .Static) {
return base.linkAsArchive(comp);