diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-08-03 21:56:21 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-08-03 21:56:21 -0700 |
| commit | edfede575c3113c3611b14a868e8d1e956ca9ef5 (patch) | |
| tree | 76e5e77bccee9103c2fe659191ebe438818e4cf6 /build.zig | |
| parent | a33efc74ed303517aa458109acfcd5c40dc97703 (diff) | |
| download | zig-edfede575c3113c3611b14a868e8d1e956ca9ef5.tar.gz zig-edfede575c3113c3611b14a868e8d1e956ca9ef5.zip | |
self-hosted: add build option for log scopes
Now you can enable a set of log scopes by passing -Dlog=<scope>
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -77,6 +77,9 @@ pub fn build(b: *Builder) !void { const link_libc = b.option(bool, "force-link-libc", "Force self-hosted compiler to link libc") orelse false; if (link_libc) exe.linkLibC(); + const log_scopes = b.option([]const []const u8, "log", "Which log scopes to enable") orelse &[0][]const u8{}; + + exe.addBuildOption([]const []const u8, "log_scopes", log_scopes); exe.addBuildOption(bool, "enable_tracy", tracy != null); if (tracy) |tracy_path| { const client_cpp = fs.path.join( |
