don't put libc on the elf linker line for objects

closes #3093
This commit is contained in:
Andrew Kelley 2019-08-19 12:32:30 -04:00
parent 5a0275c247
commit 3f7f520036
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -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");