diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-01-31 21:11:41 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-01-31 21:11:41 -0700 |
| commit | 44b105a38d966a43dcd407b971ea39fe26353eab (patch) | |
| tree | 52c80a84325a70ea69092d49c85d693ae6712b94 /build.zig | |
| parent | d3e40b0d8085ec82e6e5b33f2010de6cb9779ce5 (diff) | |
| download | zig-44b105a38d966a43dcd407b971ea39fe26353eab.tar.gz zig-44b105a38d966a43dcd407b971ea39fe26353eab.zip | |
stage2: make --debug-log work by default for debug builds
can be disabled with `-Dlog=false`
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -221,7 +221,8 @@ pub fn build(b: *Builder) !void { test_stage2.linkLibC(); } - const enable_logging = b.option(bool, "log", "Whether to enable logging") orelse false; + const is_debug = mode == .Debug; + const enable_logging = b.option(bool, "log", "Enable debug logging with --debug-log") orelse is_debug; const enable_link_snapshots = b.option(bool, "link-snapshot", "Whether to enable linker state snapshots") orelse false; const opt_version_string = b.option([]const u8, "version-string", "Override Zig version string. Default is to find out with git."); |
