diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-02-15 21:23:03 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-02-15 21:23:03 -0700 |
| commit | 4c30216d1c72140ec6d5f5393d91a5d5b8dd3711 (patch) | |
| tree | 4413f09918599a16ac9bed965afcec39f2c78802 /src/link.cpp | |
| parent | 984e7d6cc79df0a1dec4cc9ae37e899376a5f641 (diff) | |
| download | zig-4c30216d1c72140ec6d5f5393d91a5d5b8dd3711.tar.gz zig-4c30216d1c72140ec6d5f5393d91a5d5b8dd3711.zip | |
add missing system library to darwin linker job
Diffstat (limited to 'src/link.cpp')
| -rw-r--r-- | src/link.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/link.cpp b/src/link.cpp index 34e5859b39..b5fb0ecd8b 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -605,6 +605,20 @@ static void construct_linker_job_darwin(LinkJob *lj) { lj->args.append(buf_ptr(arg)); } + if (g->link_libc) { + lj->args.append("-lSystem"); + + if (platform.kind == MacOS) { + if (darwin_version_lt(&platform, 10, 5)) { + lj->args.append("-lgcc_s.10.4"); + } else if (darwin_version_lt(&platform, 10, 6)) { + lj->args.append("-lgcc_s.10.5"); + } + } else { + zig_panic("TODO"); + } + } + } static void construct_linker_job(LinkJob *lj) { |
