mirror of
https://github.com/ziglang/zig.git
synced 2026-11-22 04:37:39 -05:00
std.builtin.StackTrace: format() workaround on freestanding
This whole thing needs to be reworked but for now at least don't cause a compile error when building for a target that doesn't have stderr or detectTTYConfig.
This commit is contained in:
1 parent
696e51be49
commit
e24dcd2707
1 file changed
+5
@@ -61,6 +61,11 @@ pub const StackTrace = struct {
|
||||
options: std.fmt.FormatOptions,
|
||||
writer: anytype,
|
||||
) !void {
|
||||
// TODO: re-evaluate whether to use format() methods at all.
|
||||
// Until then, avoid an error when using GeneralPurposeAllocator with WebAssembly
|
||||
// where it tries to call detectTTYConfig here.
|
||||
if (builtin.os.tag == .freestanding) return;
|
||||
|
||||
_ = fmt;
|
||||
_ = options;
|
||||
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
|
||||
|
||||
Reference in new issue
Block a user