0.17.0-dev.215+8c5542bd3 DLL Main gets Discarded when linking -lc?

After updating to master 0.17.0-dev.215+8c5542bd3 version.
On windows x86_64-gnu target.

I tried to make the scope smaller here. To immitate.

But it seems the issue is when I link with -lc(libc) it just strips off the DllMain, actually it doesn’t strip it off, it replaces the DllMain with

push    rbp
mov     rbp, rsp
mov     eax, 1
pop     rbp
ret

Is this expected?

1 Like

Very likely to be an unintentional regression related to https://codeberg.org/ziglang/zig/pulls/32013/commits/1be84a39b8489c3d14d9233c288a505b69665caf

Definitely worth opening an issue.

1 Like

https://codeberg.org/ziglang/zig/issues/32170

This should be okay right?

1 Like