authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-09-13 23:04:15-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-09-13 23:04:15-07:00
log0379d7b4317e7e12d27b66f8a44a443d328ce539
treeeda717b76402f9f8b83210e8f4e9a4d037ff6099
parente5aef96293336fa25e6f094bf82d189176e8d1a7

stage2: don't bother building glibc when only doing build-obj


1 files changed, 6 insertions(+), 1 deletions(-)

src-self-hosted/Compilation.zig+6-1
......@@ -1548,7 +1548,12 @@ fn addBuildingGLibCWorkItems(comp: *Compilation) !void {
15481548}
15491549
15501550fn wantBuildGLibCFromSource(comp: *Compilation) bool {
1551 return comp.bin_file.options.link_libc and
1551 const is_exe_or_dyn_lib = switch (comp.bin_file.options.output_mode) {
1552 .Obj => false,
1553 .Lib => comp.bin_file.options.link_mode == .Dynamic,
1554 .Exe => true,
1555 };
1556 return comp.bin_file.options.link_libc and is_exe_or_dyn_lib and
15521557 comp.bin_file.options.libc_installation == null and
15531558 comp.bin_file.options.target.isGnuLibC();
15541559}