| author | |
| committer | |
| log | 7e9f25dd18b7da750e547de94a779e3c14c07d94 |
| tree | fe246e3b6b94e35f2f1dde9d228640ee0c1a7e0b |
| parent | 04dc5cdacaa953ca5365245f32158db70213b90e |
| signature |
2 files changed, 10 insertions(+), 5 deletions(-)
src/codegen.cpp+5-2| ... | ... | @@ -6388,9 +6388,9 @@ static void do_code_gen(CodeGen *g) { |
| 6388 | 6388 | char *error = nullptr; |
| 6389 | 6389 | LLVMVerifyModule(g->module, LLVMAbortProcessAction, &error); |
| 6390 | 6390 | #endif |
| 6391 | } | |
| 6391 | 6392 | |
| 6392 | codegen_add_time_event(g, "LLVM Emit Output"); | |
| 6393 | ||
| 6393 | static void zig_llvm_emit_output(CodeGen *g) { | |
| 6394 | 6394 | bool is_small = g->build_mode == BuildModeSmallRelease; |
| 6395 | 6395 | |
| 6396 | 6396 | Buf *output_path = &g->o_file_output_path; |
| ... | ... | @@ -8228,6 +8228,9 @@ void codegen_build_and_link(CodeGen *g) { |
| 8228 | 8228 | |
| 8229 | 8229 | codegen_add_time_event(g, "Code Generation"); |
| 8230 | 8230 | do_code_gen(g); |
| 8231 | codegen_add_time_event(g, "LLVM Emit Output"); | |
| 8232 | zig_llvm_emit_output(g); | |
| 8233 | ||
| 8231 | 8234 | if (g->want_h_file) { |
| 8232 | 8235 | codegen_add_time_event(g, "Generate .h"); |
| 8233 | 8236 | gen_h_file(g); |
src/main.cpp+5-3| ... | ... | @@ -971,6 +971,11 @@ int main(int argc, char **argv) { |
| 971 | 971 | |
| 972 | 972 | g->enable_cache = get_cache_opt(enable_cache, false); |
| 973 | 973 | codegen_build_and_link(g); |
| 974 | ||
| 975 | if (timing_info) { | |
| 976 | codegen_print_timing_report(g, stdout); | |
| 977 | } | |
| 978 | ||
| 974 | 979 | Buf *test_exe_path_unresolved = &g->output_file_path; |
| 975 | 980 | Buf *test_exe_path = buf_alloc(); |
| 976 | 981 | *test_exe_path = os_path_resolve(&test_exe_path_unresolved, 1); |
| ... | ... | @@ -981,7 +986,6 @@ int main(int argc, char **argv) { |
| 981 | 986 | } |
| 982 | 987 | } |
| 983 | 988 | |
| 984 | ||
| 985 | 989 | if (!target_can_exec(&native, target)) { |
| 986 | 990 | fprintf(stderr, "Created %s but skipping execution because it is non-native.\n", |
| 987 | 991 | buf_ptr(test_exe_path)); |
| ... | ... | @@ -1003,8 +1007,6 @@ int main(int argc, char **argv) { |
| 1003 | 1007 | if (term.how != TerminationIdClean || term.code != 0) { |
| 1004 | 1008 | fprintf(stderr, "\nTests failed. Use the following command to reproduce the failure:\n"); |
| 1005 | 1009 | fprintf(stderr, "%s\n", buf_ptr(test_exe_path)); |
| 1006 | } else if (timing_info) { | |
| 1007 | codegen_print_timing_report(g, stdout); | |
| 1008 | 1010 | } |
| 1009 | 1011 | return (term.how == TerminationIdClean) ? term.code : -1; |
| 1010 | 1012 | } else { |