Open Jomy10 opened 1 year ago
getcontext
is currently disabled when targeting android https://github.com/ziglang/zig/pull/17176
@Jomy10 can you try this patch to debug.zig?
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index 38a463171..6c4c6db82 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -169,6 +169,7 @@ pub fn relocateContext(context: *ThreadContext) void {
pub const have_getcontext = @hasDecl(os.system, "getcontext") and
builtin.os.tag != .openbsd and
+ !builtin.target.isAndroid() and
(builtin.os.tag != .linux or switch (builtin.cpu.arch) {
.x86,
.x86_64
Zig Version
0.12.0-dev.575+fb6fff256
Steps to Reproduce and Observed Behavior
std.debug.print
getcontext
:The issue points to this line: https://github.com/ziglang/zig/blob/e7bf143b364f004a76e86cad5fd3256fa87761e4/lib/std/debug.zig#L726
Expected Behavior
Expected the linker to succeed without undefined symbols.