Debugging utilities (#860)
* add debug printing for Ast and DocumentScope * add optional failing allocator
This commit is contained in:
12
build.zig
12
build.zig
@@ -49,6 +49,18 @@ pub fn build(b: *std.build.Builder) !void {
|
||||
"enable_tracy_callstack",
|
||||
b.option(bool, "enable_tracy_callstack", "Enable callstack graphs.") orelse false,
|
||||
);
|
||||
|
||||
exe_options.addOption(
|
||||
bool,
|
||||
"enable_failing_allocator",
|
||||
b.option(bool, "enable_failing_allocator", "Whether to use a randomly failing allocator.") orelse false,
|
||||
);
|
||||
|
||||
exe_options.addOption(
|
||||
u32,
|
||||
"enable_failing_allocator_likelihood",
|
||||
b.option(u32, "enable_failing_allocator_likelihood", "The chance that an allocation will fail is `1/likelihood`") orelse 256,
|
||||
);
|
||||
|
||||
const version = v: {
|
||||
const version_string = b.fmt("{d}.{d}.{d}", .{ zls_version.major, zls_version.minor, zls_version.patch });
|
||||
|
||||
Reference in New Issue
Block a user