# link.Coff: Pass \-lldmingw to LLD earlier and regardless of \-lc\. · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/814a41b48f157fff1f48c4a14e92142d1e6e5748)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 814a41b48f157fff1f48c4a14e92142d1e6e5748

Requested commit: 814a41b48f157fff1f48c4a14e92142d1e6e5748

Commit: 814a41b48f157fff1f48c4a14e92142d1e6e5748

Tree: 4b23737f048c6f574a4e285bfd793a023f3c37d7

Author: Alex Rønne Petersen

Committer: Alex Rønne Petersen

## Message

```
link.Coff: Pass -lldmingw to LLD earlier and regardless of -lc.

The -lldmingw option affects a lot of logic throughout LLD. We need to pass it
for *-windows-gnu even when we're not actually linking MinGW since we're still
using the MinGW ABI with all that that entails. (One particular problem we would
run into is missing handling of stdcall-decorated symbols for 32-bit x86.) Also,
various other LLD options are sensitive to this option, so it's best to pass it
as early as possible.

Closes #11817.

```

## Parents

- [3054486d1dedd49553680da2c074d1ab413797fd](https://git.cafe/gitcafe/zig/commit/3054486d1dedd49553680da2c074d1ab413797fd?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/814a41b48f157fff1f48c4a14e92142d1e6e5748?format=markdown)
