diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-06-09 15:33:04 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-06-09 20:00:59 -0700 |
| commit | 2bf532fc23ec014201bb1e69cb3b44e37e23f14c (patch) | |
| tree | d87c47ac302f67d82d4d9692cf8181925152493f /build.zig | |
| parent | bc36da0cb80eebffbbd86a430b435492e00f8378 (diff) | |
| download | zig-2bf532fc23ec014201bb1e69cb3b44e37e23f14c.tar.gz zig-2bf532fc23ec014201bb1e69cb3b44e37e23f14c.zip | |
stage2: use std.debug.Trace only when explicitly enabled
Because it bumps up the stack space requirements, which is making a test
case fail on aarch64 drone CI.
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -131,6 +131,7 @@ pub fn build(b: *Builder) !void { const link_libc = b.option(bool, "force-link-libc", "Force self-hosted compiler to link libc") orelse enable_llvm; const strip = b.option(bool, "strip", "Omit debug information") orelse false; const use_zig0 = b.option(bool, "zig0", "Bootstrap using zig0") orelse false; + const value_tracing = b.option(bool, "value-tracing", "Enable extra state tracking to help troubleshoot bugs in the compiler (using the std.debug.Trace API)") orelse false; const mem_leak_frames: u32 = b.option(u32, "mem-leak-frames", "How many stack frames to print when a memory leak occurs. Tests get 2x this amount.") orelse blk: { if (strip) break :blk @as(u32, 0); @@ -353,6 +354,7 @@ pub fn build(b: *Builder) !void { exe_options.addOption(bool, "enable_tracy", tracy != null); exe_options.addOption(bool, "enable_tracy_callstack", tracy_callstack); exe_options.addOption(bool, "enable_tracy_allocation", tracy_allocation); + exe_options.addOption(bool, "value_tracing", value_tracing); exe_options.addOption(bool, "is_stage1", is_stage1); exe_options.addOption(bool, "omit_stage2", omit_stage2); if (tracy) |tracy_path| { @@ -402,6 +404,7 @@ pub fn build(b: *Builder) !void { test_cases_options.addOption(bool, "enable_rosetta", b.enable_rosetta); test_cases_options.addOption(bool, "enable_darling", b.enable_darling); test_cases_options.addOption(u32, "mem_leak_frames", mem_leak_frames * 2); + test_cases_options.addOption(bool, "value_tracing", value_tracing); test_cases_options.addOption(?[]const u8, "glibc_runtimes_dir", b.glibc_runtimes_dir); test_cases_options.addOption([:0]const u8, "version", try b.allocator.dupeZ(u8, version)); test_cases_options.addOption(std.SemanticVersion, "semver", semver); |
