aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-08-03 21:56:21 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-08-03 21:56:21 -0700
commitedfede575c3113c3611b14a868e8d1e956ca9ef5 (patch)
tree76e5e77bccee9103c2fe659191ebe438818e4cf6 /build.zig
parenta33efc74ed303517aa458109acfcd5c40dc97703 (diff)
downloadzig-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.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index a5e430fb01..51089664ad 100644
--- a/build.zig
+++ b/build.zig
@@ -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(