Commit 3f7f520036

Andrew Kelley <andrew@ziglang.org>
2019-08-19 18:32:30
don't put libc on the elf linker line for objects
closes #3093
1 parent 5a0275c
Changed files (1)
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");