| ... | @@ -757,8 +757,12 @@ static void construct_linker_job_macho(LinkJob *lj) { | ... | @@ -757,8 +757,12 @@ static void construct_linker_job_macho(LinkJob *lj) { |
| 757 | // so we always link against libSystem | 757 | // so we always link against libSystem |
| 758 | lj->args.append("-lSystem"); | 758 | lj->args.append("-lSystem"); |
| 759 | } else { | 759 | } else { |
| 760 | Buf *arg = buf_sprintf("-l%s", buf_ptr(link_lib->name)); | 760 | if (strchr(buf_ptr(link_lib->name), '/') == nullptr) { |
| 761 | lj->args.append(buf_ptr(arg)); | 761 | Buf *arg = buf_sprintf("-l%s", buf_ptr(link_lib->name)); |
| | 762 | lj->args.append(buf_ptr(arg)); |
| | 763 | } else { |
| | 764 | lj->args.append(buf_ptr(link_lib->name)); |
| | 765 | } |
| 762 | } | 766 | } |
| 763 | } | 767 | } |
| 764 | } else { | 768 | } else { |