authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-11 20:54:39-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-11 20:54:39-04:00
log7e9f25dd18b7da750e547de94a779e3c14c07d94
treefe246e3b6b94e35f2f1dde9d228640ee0c1a7e0b
parent04dc5cdacaa953ca5365245f32158db70213b90e
signaturelock-open Commit is signed but in an unrecognized format.

stage1: clean up timing report in test mode


2 files changed, 10 insertions(+), 5 deletions(-)

src/codegen.cpp+5-2
......@@ -6388,9 +6388,9 @@ static void do_code_gen(CodeGen *g) {
63886388 char *error = nullptr;
63896389 LLVMVerifyModule(g->module, LLVMAbortProcessAction, &error);
63906390#endif
6391}
63916392
6392 codegen_add_time_event(g, "LLVM Emit Output");
6393
6393static void zig_llvm_emit_output(CodeGen *g) {
63946394 bool is_small = g->build_mode == BuildModeSmallRelease;
63956395
63966396 Buf *output_path = &g->o_file_output_path;
......@@ -8228,6 +8228,9 @@ void codegen_build_and_link(CodeGen *g) {
82288228
82298229 codegen_add_time_event(g, "Code Generation");
82308230 do_code_gen(g);
8231 codegen_add_time_event(g, "LLVM Emit Output");
8232 zig_llvm_emit_output(g);
8233
82318234 if (g->want_h_file) {
82328235 codegen_add_time_event(g, "Generate .h");
82338236 gen_h_file(g);
src/main.cpp+5-3
......@@ -971,6 +971,11 @@ int main(int argc, char **argv) {
971971
972972 g->enable_cache = get_cache_opt(enable_cache, false);
973973 codegen_build_and_link(g);
974
975 if (timing_info) {
976 codegen_print_timing_report(g, stdout);
977 }
978
974979 Buf *test_exe_path_unresolved = &g->output_file_path;
975980 Buf *test_exe_path = buf_alloc();
976981 *test_exe_path = os_path_resolve(&test_exe_path_unresolved, 1);
......@@ -981,7 +986,6 @@ int main(int argc, char **argv) {
981986 }
982987 }
983988
984
985989 if (!target_can_exec(&native, target)) {
986990 fprintf(stderr, "Created %s but skipping execution because it is non-native.\n",
987991 buf_ptr(test_exe_path));
......@@ -1003,8 +1007,6 @@ int main(int argc, char **argv) {
10031007 if (term.how != TerminationIdClean || term.code != 0) {
10041008 fprintf(stderr, "\nTests failed. Use the following command to reproduce the failure:\n");
10051009 fprintf(stderr, "%s\n", buf_ptr(test_exe_path));
1006 } else if (timing_info) {
1007 codegen_print_timing_report(g, stdout);
10081010 }
10091011 return (term.how == TerminationIdClean) ? term.code : -1;
10101012 } else {