diff options
| author | alter <p@scene.cl> | 2016-09-12 01:01:06 -0300 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-09-14 02:46:02 -0400 |
| commit | cf9b21c09fc641b4697e06981ac5114a8d3d09ab (patch) | |
| tree | a69ab92c864c8807209eb09214b868bf8cce39ec /src/link.cpp | |
| parent | 06f2f4d64b63cf78a3ff77cc64dbc822123f454d (diff) | |
| download | zig-cf9b21c09fc641b4697e06981ac5114a8d3d09ab.tar.gz zig-cf9b21c09fc641b4697e06981ac5114a8d3d09ab.zip | |
MacOSX compatibility
- Implemented some syscall for MacOSX
- tested on : El Capitan 10.11 x86_64
- make self hosted test run on macosx
- modified run_test so it does not fail when parseh throws
warnings (most of them are related to buildin types from
gcc that arent defined in header files and unions)
- making -mmacosx-version-min and -mios-version-min works like
gcc (command line paramers have precedence over enviroment variables)
Diffstat (limited to 'src/link.cpp')
| -rw-r--r-- | src/link.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/link.cpp b/src/link.cpp index 6b3d3dce83..56a44c4612 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -643,6 +643,12 @@ static void construct_linker_job_darwin(LinkJob *lj) { lj->args.append((const char *)buf_ptr(&lj->out_file_o)); + if (g->is_test_build) { + const char *test_runner_name = g->link_libc ? "test_runner_libc" : "test_runner_nolibc"; + Buf *test_runner_o_path = build_o(g, test_runner_name); + lj->args.append(buf_ptr(test_runner_o_path)); + } + for (int i = 0; i < g->link_libs.length; i += 1) { Buf *link_lib = g->link_libs.at(i); Buf *arg = buf_sprintf("-l%s", buf_ptr(link_lib)); |
