diff options
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 13c93b269d..b398eec991 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -506,8 +506,6 @@ int main(int argc, char **argv) { ZigList<const char *> llvm_argv = {0}; llvm_argv.append("zig (LLVM option parsing)"); - Stage2ProgressNode *root_progress_node = stage2_progress_start_root(stage2_progress_create(), "", 0, 0); - if (argc >= 2 && strcmp(argv[1], "build") == 0) { Buf zig_exe_path_buf = BUF_INIT; if ((err = os_self_exe_path(&zig_exe_path_buf))) { @@ -589,6 +587,7 @@ int main(int argc, char **argv) { Buf *cache_dir_buf = buf_create_from_str(cache_dir); full_cache_dir = os_path_resolve(&cache_dir_buf, 1); } + Stage2ProgressNode *root_progress_node = stage2_progress_start_root(stage2_progress_create(), "", 0, 0); CodeGen *g = codegen_create(main_pkg_path, build_runner_path, &target, OutTypeExe, BuildModeDebug, override_lib_dir, nullptr, &full_cache_dir, false, root_progress_node); @@ -965,6 +964,10 @@ int main(int argc, char **argv) { return EXIT_FAILURE; } + Stage2Progress *progress = stage2_progress_create(); + Stage2ProgressNode *root_progress_node = stage2_progress_start_root(progress, "", 0, 0); + if (color == ErrColorOff) stage2_progress_disable_tty(progress); + init_all_targets(); ZigTarget target; |
