<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/148365>148365</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [Support/BLAKE3] #147948 breaks Cygwin build
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          kikairoya
      </td>
    </tr>
</table>

<pre>
    https://github.com/llvm/llvm-project/pull/147948 causes breaking of Cygwin build.

```
/home/kikai/llvm-origin-main/llvm/lib/Support/BLAKE3/blake3_dispatch.c: 関数 ‘blake3_xof_many’ 内:
/home/kikai/llvm-origin-main/llvm/lib/Support/BLAKE3/blake3_dispatch.c:241:5: エラー: implicit declaration of function ‘blake3_xof_many_avx512’; did you mean ‘blake3_hash_many_a  avx512’? [-Wimplicit-function-declaration]
  241 |     blake3_xof_many_avx512(cv, block, block_len, counter, flags, out, outblocks);
      |     ^~~~~~~~~~~~~~~~~~~~~~
      |     blake3_hash_many_avx512
```

I've reported for upstream: https://github.com/BLAKE3-team/BLAKE3/issues/494

There are possibly workarounds:

1. Patch blake3 itself
2. Use `blake3_avx512.c` instead of assembly on Cygwin
3. Define `_WIN32` for compiling `blake3_dispatch.c`

I'm not sure which of these approaches would be the most appropriate, so I'd appreciate any suggestions.
Once there's a consensus, I'm happy to submit a PR accordingly.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0VM2O4zYTfJr2pWFBIiVZOuggz1jA4vuQLPKDPQ4oipYYU6TAn5n1Jc8eUJZnJ3E2QA4hDKhNsruqyWIx5-SohWigOELxvGPBT8Y2F3lh0por2_VmuDaT94sD2gLpgHSj9FPoE25mIJ1Sr_fPfrHmN8E9kG4JSgHpsvxQ5xVyFpxw2FvBLlKPaM74dB3fpMY-SDUkkLbxV6bbL41Ak5kFkG5lcgcwVo5S72cm9Qdo2QPp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