aboutsummaryrefslogtreecommitdiff
path: root/src/link.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-08-19 12:32:30 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-08-19 12:33:36 -0400
commit3f7f52003690ccee8a2a33e91258428e22761492 (patch)
tree3467bbf1f913f2c571895164fbd67578bce33edc /src/link.cpp
parent5a0275c247730040af91666518a6aa3f518e6905 (diff)
downloadzig-3f7f52003690ccee8a2a33e91258428e22761492.tar.gz
zig-3f7f52003690ccee8a2a33e91258428e22761492.zip
don't put libc on the elf linker line for objects
closes #3093
Diffstat (limited to 'src/link.cpp')
-rw-r--r--src/link.cpp2
1 files changed, 1 insertions, 1 deletions
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");