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](/github-metadata-backup-bitcoin-bitcoin/29852/) (comment)
compile failure: MSVC 17.12.0 internal compiler error [#31303](/github-metadata-backup-bitcoin-bitcoin/31303/)
legal, but brittle stdlib: util: Drop boost posix_time in ParseISO8601DateTime [#31391](/github-metadata-backup-bitcoin-bitcoin/31391/) (comment)
unspecified issue: refactor: Check translatable format strings at compile-time [#31061](/github-metadata-backup-bitcoin-bitcoin/31061/) (comment)
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