From 3f7f52003690ccee8a2a33e91258428e22761492 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 19 Aug 2019 12:32:30 -0400 Subject: [PATCH] don't put libc on the elf linker line for objects closes #3093 --- src/link.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/link.cpp b/src/link.cpp index 44b3abaa90bc051b90f81fd1087cd26487c1d39d..8a1f889234d8d866165a81bdb2433cac4fefa457 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"); -- 2.54.0