zig test no longer requires a separate test_runner.o file

See #298
This commit is contained in:
Andrew Kelley
2017-04-27 16:15:41 -04:00
parent 7b0542d08b
commit 7e11ef79d6
10 changed files with 185 additions and 132 deletions

View File

@@ -263,11 +263,6 @@ static void construct_linker_job_elf(LinkJob *lj) {
lj->args.append((const char *)buf_ptr(g->link_objects.at(i)));
}
if (g->is_test_build) {
Buf *test_runner_o_path = build_o(g, "test_runner");
lj->args.append(buf_ptr(test_runner_o_path));
}
if (!g->link_libc && (g->out_type == OutTypeExe || g->out_type == OutTypeLib)) {
Buf *builtin_o_path = build_o(g, "builtin");
lj->args.append(buf_ptr(builtin_o_path));
@@ -408,11 +403,6 @@ static void construct_linker_job_coff(LinkJob *lj) {
lj->args.append((const char *)buf_ptr(g->link_objects.at(i)));
}
if (g->is_test_build) {
Buf *test_runner_o_path = build_o(g, "test_runner");
lj->args.append(buf_ptr(test_runner_o_path));
}
if (!g->link_libc && (g->out_type == OutTypeExe || g->out_type == OutTypeLib)) {
Buf *builtin_o_path = build_o(g, "builtin");
lj->args.append(buf_ptr(builtin_o_path));
@@ -674,11 +664,6 @@ static void construct_linker_job_macho(LinkJob *lj) {
lj->args.append((const char *)buf_ptr(g->link_objects.at(i)));
}
if (g->is_test_build) {
Buf *test_runner_o_path = build_o(g, "test_runner");
lj->args.append(buf_ptr(test_runner_o_path));
}
for (size_t i = 0; i < g->link_libs.length; i += 1) {
Buf *link_lib = g->link_libs.at(i);
if (buf_eql_str(link_lib, "c")) {