commit d71d6363ce15b7bb7b66efad2cb62dfa79045e80 (tree) parent 10fa51a085d1312c313b7669ce87533bd7b4c406 Author: Andrew Kelley <superjoe30@gmail.com> Date: Sat, 23 Sep 2017 13:03:25 -0400 macho linking: support full lib paths correctly Diffstat:
| M | src/link.cpp | | | 8 | ++++++-- |
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/link.cpp b/src/link.cpp @@ -757,8 +757,12 @@ static void construct_linker_job_macho(LinkJob *lj) { // so we always link against libSystem lj->args.append("-lSystem"); } else { - Buf *arg = buf_sprintf("-l%s", buf_ptr(link_lib->name)); - lj->args.append(buf_ptr(arg)); + if (strchr(buf_ptr(link_lib->name), '/') == nullptr) { + Buf *arg = buf_sprintf("-l%s", buf_ptr(link_lib->name)); + lj->args.append(buf_ptr(arg)); + } else { + lj->args.append(buf_ptr(link_lib->name)); + } } } } else {