-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
The bug
error: ld.lld: relocation R_X86_64_TPOFF32 against debug.panic_stage cannot be used with -shared
note: defined in C:\Users\User\AppData\Local\zig\o\bf2885e2608e5771377909bcb7e7e5e1\libubsan_rt.a(C:\Users\User\AppData\Local\zig\o\bf2885e2608e5771377909bcb7e7e5e1\libubsan_rt.a.o)
note: referenced by debug.zig:640 (C:\zig\current\lib\std/debug.zig:640)
note: C:\Users\User\AppData\Local\zig\o\bf2885e2608e5771377909bcb7e7e5e1\libubsan_rt.a.o:(debug.defaultPanic) in archive C:\Users\User\AppData\Local\zig\o\bf2885e2608e5771377909bcb7e7e5e1\libubsan_rt.a
It's referring to the threadlocal variable.
/// Counts how many times the panic handler is invoked by this thread.
/// This is used to catch and handle panics triggered by the panic handler.
threadlocal var panic_stage: usize = 0;
Will need to investigate why this doesn't work.
Workaround
- Do a ReleaseSafe or ReleaseFast build, for libraries like SDL2, just build as "ReleaseSafe" when doing "Debug" build.
Related upstream issue(s):
Metadata
Metadata
Assignees
Labels
No labels