| author | |
| committer | |
| log | cfbcb4116017a27a403f8be11a32f25f6c1c8671 |
| tree | 2f4e7267a066e70adf4f1f17520220e5e42bfce5 |
| parent | 750b00c642782127736eb378ec9583db2d680bb6 |
3 files changed, 10 insertions(+), 4 deletions(-)
BRANCH_TODO+1-3| ... | ... | @@ -1,10 +1,8 @@ |
| 1 | 1 | * audit the CLI options for stage2 |
| 2 | 2 | * audit the base cache hash |
| 3 | * On operating systems that support it, do an execve for `zig test` and `zig run` rather than child process. | |
| 4 | * `-ftime-report` | |
| 5 | * -fstack-report print stack size diagnostics\n" | |
| 6 | 3 | * try building some software with zig cc to make sure it didn't regress |
| 7 | 4 | |
| 5 | * On operating systems that support it, do an execve for `zig test` and `zig run` rather than child process. | |
| 8 | 6 | * implement proper parsing of clang stderr/stdout and exposing compile errors with the Compilation API |
| 9 | 7 | * implement proper parsing of LLD stderr/stdout and exposing compile errors with the Compilation API |
| 10 | 8 | * support cross compiling stage2 with `zig build` |
src/Compilation.zig+4-1| ... | ... | @@ -61,6 +61,7 @@ verbose_cimport: bool, |
| 61 | 61 | verbose_llvm_cpu_features: bool, |
| 62 | 62 | disable_c_depfile: bool, |
| 63 | 63 | time_report: bool, |
| 64 | stack_report: bool, | |
| 64 | 65 | |
| 65 | 66 | c_source_files: []const CSourceFile, |
| 66 | 67 | clang_argv: []const []const u8, |
| ... | ... | @@ -348,6 +349,7 @@ pub const InitOptions = struct { |
| 348 | 349 | single_threaded: bool = false, |
| 349 | 350 | is_native_os: bool, |
| 350 | 351 | time_report: bool = false, |
| 352 | stack_report: bool = false, | |
| 351 | 353 | link_eh_frame_hdr: bool = false, |
| 352 | 354 | linker_script: ?[]const u8 = null, |
| 353 | 355 | version_script: ?[]const u8 = null, |
| ... | ... | @@ -821,6 +823,7 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { |
| 821 | 823 | .owned_link_dir = owned_link_dir, |
| 822 | 824 | .color = options.color, |
| 823 | 825 | .time_report = options.time_report, |
| 826 | .stack_report = options.stack_report, | |
| 824 | 827 | .test_filter = options.test_filter, |
| 825 | 828 | .test_name_prefix = options.test_name_prefix, |
| 826 | 829 | .test_evented_io = options.test_evented_io, |
| ... | ... | @@ -2670,7 +2673,7 @@ fn updateStage1Module(comp: *Compilation) !void { |
| 2670 | 2673 | .function_sections = comp.bin_file.options.function_sections, |
| 2671 | 2674 | .enable_stack_probing = comp.bin_file.options.stack_check, |
| 2672 | 2675 | .enable_time_report = comp.time_report, |
| 2673 | .enable_stack_report = false, | |
| 2676 | .enable_stack_report = comp.stack_report, | |
| 2674 | 2677 | .test_is_evented = comp.test_evented_io, |
| 2675 | 2678 | .verbose_tokenize = comp.verbose_tokenize, |
| 2676 | 2679 | .verbose_ast = comp.verbose_ast, |
src/main.zig+5| ... | ... | @@ -284,6 +284,7 @@ const usage_build_generic = |
| 284 | 284 | \\ |
| 285 | 285 | \\Debug Options (Zig Compiler Development): |
| 286 | 286 | \\ -ftime-report Print timing diagnostics |
| 287 | \\ -fstack-report Print stack size diagnostics | |
| 287 | 288 | \\ --verbose-link Display linker invocations |
| 288 | 289 | \\ --verbose-cc Display C compiler invocations |
| 289 | 290 | \\ --verbose-tokenize Enable compiler debug output for tokenization |
| ... | ... | @@ -390,6 +391,7 @@ fn buildOutputType( |
| 390 | 391 | var verbose_cimport = false; |
| 391 | 392 | var verbose_llvm_cpu_features = false; |
| 392 | 393 | var time_report = false; |
| 394 | var stack_report = false; | |
| 393 | 395 | var show_builtin = false; |
| 394 | 396 | var emit_bin: Emit = .yes_default_path; |
| 395 | 397 | var emit_asm: Emit = .no; |
| ... | ... | @@ -728,6 +730,8 @@ fn buildOutputType( |
| 728 | 730 | watch = true; |
| 729 | 731 | } else if (mem.eql(u8, arg, "-ftime-report")) { |
| 730 | 732 | time_report = true; |
| 733 | } else if (mem.eql(u8, arg, "-fstack-report")) { | |
| 734 | stack_report = true; | |
| 731 | 735 | } else if (mem.eql(u8, arg, "-fPIC")) { |
| 732 | 736 | want_pic = true; |
| 733 | 737 | } else if (mem.eql(u8, arg, "-fno-PIC")) { |
| ... | ... | @@ -1568,6 +1572,7 @@ fn buildOutputType( |
| 1568 | 1572 | .machine_code_model = machine_code_model, |
| 1569 | 1573 | .color = color, |
| 1570 | 1574 | .time_report = time_report, |
| 1575 | .stack_report = stack_report, | |
| 1571 | 1576 | .is_test = arg_mode == .zig_test, |
| 1572 | 1577 | .each_lib_rpath = each_lib_rpath, |
| 1573 | 1578 | .test_evented_io = test_evented_io, |