Safe release build fails for ZLIB

Pretty much recreation of this repository: https://github.com/nektro/zig-zlib
Fails zig build -Drelease-safe=true
with

lld-link: warning: ignoring debug info with an invalid version (0) in ...\zig-zlib\zig-cache\o\64b428a6243e533e9e2bfbf30e039576\zig-zlib.obj
lld-link: error: undefined symbol: _tls_index
>>> referenced by ...\zig-zlib\zig-cache\o\64b428a6243e533e9e2bfbf30e039576\zig-zlib.exe.lto.obj:(std.debug.panicImpl)
>>> referenced by ...\zig-zlib\zig-cache\o\64b428a6243e533e9e2bfbf30e039576\zig-zlib.exe.lto.obj:(std.debug.panicImpl)
>>> referenced by ...\zig-zlib\zig-cache\o\64b428a6243e533e9e2bfbf30e039576\zig-zlib.exe.lto.obj:(std.debug.panicImpl)
error: LLDReportedFailure

Am I missing something?

I’ve asked nektro and that’s apparently a linker bug on windows

2 Likes

Oh, I somehow missed that issue. Thanks.