From 3f7f52003690ccee8a2a33e91258428e22761492 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 19 Aug 2019 12:32:30 -0400 Subject: don't put libc on the elf linker line for objects closes #3093 --- src/link.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/link.cpp') diff --git a/src/link.cpp b/src/link.cpp index 44b3abaa90..8a1f889234 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -1753,7 +1753,7 @@ static void construct_linker_job_elf(LinkJob *lj) { // libc dep - if (g->libc_link_lib != nullptr) { + if (g->libc_link_lib != nullptr && g->out_type != OutTypeObj) { if (g->libc != nullptr) { if (!g->have_dynamic_link) { lj->args.append("--start-group"); -- cgit v1.2.3