You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RFC: Drop MSVC as a supported compiler on Windows (keep clang-cl) #36153
Concept ACK, just restating some of the things said on IRC: losing compiler diversity is unfortunate but given that MSVC is closed-source, gleaning information from any problems it surfaces is difficult, and their process for dealing with internal bugs is opaque.
see e.g. #31303 and #32499 (comment) where e.g. it was not even clear what version fixed an internal issue.
It seems like MSVC is causing us a lot of overhead, and very limited actual benefits. Unless there are strong indications that MSVC is going to take a different course (e.g. becoming fully open-source, better support, ... ) in the near term (I can't find them), it seems best to drop MSVC.
For reference, here is the relevant IRC conversation (would be useful to link in OP).
I think it would also be useful to be explicit about what dropping support means. In my book, that means when evaluating a change, MSVC support must be discounted completely. That would also mean that PRs that remove MSVC-specific code would be equivalent to cleaning up dead code, and thus generally welcomed if people want to work on it.
Should a short release note snippet be added to the wiki draft?
# Build* Self-compilation on Windows with MSVC is expected to be dropped in favor of clang-cl support. See https://github.com/bitcoin/bitcoin/issues/36153
Concept ACK. I've been a voice for keeping MSVC support for the sake of compiler diversity, but it's pretty clearly a net negative to support at this point. Rather than pointing out buggy code that clang/gcc wrongly allow, it's far more likely to cause us grief. All of the points listed as motivation are good and relevant imo.
I've been a voice for keeping MSVC support for the sake of compiler diversity
Same, but I think this is still trivially possible even after #31507. I think it just needs a minimal patch to not link the clang-rt for int128 (#31507 (comment)). Also, it needs a cmake preset (or similar) with the list of compile warning suppressions.
This way, anyone can use Bitcoin Core code to find bugs in their compiler, but in the rare case that a bug is in Bitcoin Core, it is still possible to find and fix on our side.
I think it just needs a minimal patch to not link the clang-rt for int128 (#31507 (comment)). Also, it needs a cmake preset (or similar) with the list of compile warning suppressions.
Activity
davidgumberg commentedon Sep 2, 2026
Concept ACK, just restating some of the things said on IRC: losing compiler diversity is unfortunate but given that MSVC is closed-source, gleaning information from any problems it surfaces is difficult, and their process for dealing with internal bugs is opaque.
see e.g. #31303 and #32499 (comment) where e.g. it was not even clear what version fixed an internal issue.
stickies-v commentedon Sep 3, 2026
Concept ACK
It seems like MSVC is causing us a lot of overhead, and very limited actual benefits. Unless there are strong indications that MSVC is going to take a different course (e.g. becoming fully open-source, better support, ... ) in the near term (I can't find them), it seems best to drop MSVC.
For reference, here is the relevant IRC conversation (would be useful to link in OP).
I think it would also be useful to be explicit about what dropping support means. In my book, that means when evaluating a change, MSVC support must be discounted completely. That would also mean that PRs that remove MSVC-specific code would be equivalent to cleaning up dead code, and thus generally welcomed if people want to work on it.
maflcko commentedon Sep 19, 2026
Should a short release note snippet be added to the wiki draft?
(or so)
maflcko commentedon Sep 24, 2026
Added the note to https://github.com/bitcoin-core/bitcoin-devwiki/wiki/32.0-Release-Notes-Draft#build-system
(edit: feel free to remove, if this isn't needed)
maflcko commentedon Sep 29, 2026
IIRC there was a minor C++ compat bug, as the STL uses a smaller int size for chrono minutes: #31391 (comment). But this is just minor.Edit: Please ignore the comment. Clang-cl obviously still uses the STL, so nothing changes here.
fanquake commentedon Oct 8, 2026
More Windows/MSVC bugs in #36451.
hebasto commentedon Oct 14, 2026
Linked.
theuni commentedon Oct 15, 2026
Concept ACK. I've been a voice for keeping MSVC support for the sake of compiler diversity, but it's pretty clearly a net negative to support at this point. Rather than pointing out buggy code that clang/gcc wrongly allow, it's far more likely to cause us grief. All of the points listed as motivation are good and relevant imo.
maflcko commentedon Oct 15, 2026
Same, but I think this is still trivially possible even after #31507. I think it just needs a minimal patch to not link the clang-rt for int128 (#31507 (comment)). Also, it needs a cmake preset (or similar) with the list of compile warning suppressions.
I don't have Windows, so I can't try this, but I am confident that a modern LLM bot can keep this alive and the orange site happy. (Ref: https://news.ycombinator.com/item?id=36436113 [Microsoft uses Bitcoin as part of MSVC validation test suite ])
This way, anyone can use Bitcoin Core code to find bugs in their compiler, but in the rare case that a bug is in Bitcoin Core, it is still possible to find and fix on our side.
hebasto commentedon Oct 16, 2026
See hebasto/bitcoin-core-nightly#395.
The latter can be done via
CXXFLAGS.Also
src/test/util_not_null_tests.cppfails to compile due to https://github.com/hebasto/bitcoin/blob/f0b38b15f2d02c886afc4266c27468622bdc4f64/src/test/util_not_null_tests.cpp#L111-L113.Merge bitcoin/bitcoin#31507: build: Use clang-cl to build on Windows …