Building on Windows using Clang instead of the MS compiler may be beneficial, considering the issues with the latter, as outlined in #31456:
non-optimized codegen: [build: remove need to test for endianness #29852 (comment)](/bitcoin-bitcoin/29852/#issuecomment-2049803970)
compile failure: [MSVC 17.12.0 internal compiler error #31303](https://github.com/bitcoin/bitcoin/issues/31303)
legal, but brittle stdlib: [util: Drop boost posix_time in ParseISO8601DateTime #31391 (comment)](/bitcoin-bitcoin/31391/#issuecomment-2510762011)
unspecified issue: [refactor: Check translatable format strings at compile-time #31061 (comment)](/bitcoin-bitcoin/31061/#issuecomment-2531244463)
Additionally, MSVC does not support inline assembly on the ARM and x64 processors.
So this PR:
Additionally, clang-cl:
- Produces binaries with better performance. For example:
| MSVC, block/s | clang-cl, block/s | benchmark |
|---|---|---|
| 7.40 | 11.52 | ConnectBlockAllEcdsa |
| 7.32 | 11.81 | ConnectBlockAllSchnorr |
| 7.38 | 11.45 | ConnectBlockMixedEcdsaSchnorr |
| 91.86 | 143.12 | DeserializeAndCheckBlockTest |
| 121.46 | 189.04 | DeserializeBlockTest |