Repository navigation
ci(tests): add msvc@system leg on Windows and pin MSVC via setup-msvc-dev - #16
Open
ZheFeng7110 wants to merge 21 commits into
Open
ZheFeng7110 wants to merge 21 commits into
ZheFeng7110 wants to merge 21 commits into
Conversation
…tree and statechart tests
…or IFC friend bug
…onstexpr link errors, and test expectations
… RangeRule, interprocess win32_api, describe) and gcc duplicate constexpr
…indows -l* ldflags for clang++, and update patches/README
…so tests/dll auto-exports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add native Windows MSVC (
windows-msvc,msvc@system, x86_64) to theBuild and Testsworkflow (testgroups A/B,tests/dll&tests/test/utfsub-projects, andexamples), pinned viaTheMrMilchmann/setup-msvc-dev@v4(MSVC 14.52 + Windows SDK 10.0.26100.0), along with the module/export/patch/test adaptations needed for all 120 Boost libraries and 417 test programs to build and pass cleanly under nativecl.exe.Changes
1. CI & Build Configuration
.github/workflows/tests.yml:windows-latestusingTheMrMilchmann/setup-msvc-dev@v4(arch: x64,toolset: "14.52",sdk: "10.0.26100.0").windows-msvc(msvc@system,x86_64) matrix entries to bothtest(groups A and B) andexamplesjobs; skipmcpp toolchain installwheninstallis empty; includeMSVC_TOOLSETandWINDOWS_SDKin themsvc@systemsandbox cache key.examples/git-deponmsvc@systemwhileexamples/git-dep/mcpp.tomlstill pins the pre-MSVC release tagmwrap-1.92.0(future release tags will exercisemsvc@systemautomatically).mcpp.toml:[target.'cfg(compiler = "msvc")'.build]withcxxflags = ["/Zc:__cplusplus", "/bigobj"]and Windows*.libldflags(while keeping-l*in[target.windows.build]forwindows-llvm-msvc).build.mcpp:mcpplibs.mwrap.boost.sortfrom the root:closurepartition on native MSVC (_MSC_VER && !__clang__) whenrangeis enabled (avoidingC2757: 'boost::sort'function vs namespace conflict, matching GCC's existing handling).2. Platform & Compiler Export Guards (
tools/export_policy.toml,generated/exports/*.inc)hana: Guard#include <boost/hana/experimental/type_name.hpp>insrc/hana.cppmand its 4 exported symbols underdefined(BOOST_HANA_CONFIG_CLANG) || defined(BOOST_HANA_CONFIG_GCC).type_traits&variant: Guard MSVC-absent helpers (false_or_cpp11_noexcept_move_*,tt_align_ns::{a2,a4},sized_type_for_promotion) and handleBOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE(::mpl_::*vsboost::mpl::*).concept_check: Guardgeneral.hppsymbols under!defined(BOOST_MSVC)and export themsvc.hppsymbols in#else.algorithm,units,uuid,convert: Guardis_blank(!defined(BOOST_NO_CXX11)),si::pascal(!defined(BOOST_UNITS_NO_PASCAL)),uuids::detail::*_u128(defined(__SIZEOF_INT128__)), andparameter::aux::tag_if_*(defined(BOOST_PARAMETER_CAN_USE_MP11) && !BOOST_WORKAROUND(BOOST_MSVC, >= 1910)).property_tree: Addmulti_indexto[property_tree.deps]andsrc/property_tree.cppmso ADL findsboost::multi_index::detail::operator==.interprocess: Addboost::interprocess::winapi::{hkey_local_machine,invalid_handle_value,key_query_value}to thedefined(_WIN32)guard.3. Upstream Adaptations (
patches/,tools/apply_patches.py)type_erasure.patch: DisableBOOST_TYPE_ERASURE_SFINAE_FRIENDLY_CONSTRUCTORSunderBOOST_MSVCto avoid an MSVC 14.52 IFC serializer ICE (C1001,msc1.cpp:1678) on the mutual CRTP cycle inany<Concept, T>, and guard its 13 helper symbols intools/export_policy.toml.math.patch: IntroduceBOOST_MATH_DIFF_DETAIL_NS(diff_detailunderBOOST_MSVC,detailelsewhere) to resolveC2872: 'detail': ambiguous symbolwithautodiff_v1::detail, and promotelambert_w_lookup::*tables toBOOST_INLINE_CONSTEXPR.asio.patch: Work around MSVC 14.52 IFC bugs by keeping executorrequire/querymemberspublic:and using upstream'stypedef T type;fallback forproxy/static_proxySFINAE wrappers underBOOST_ASIO_MSVC.url.patch: Makeurl_view_base/url_base/static_url_baseconstructors/destructors/dataprotected:, moveurl_view_base::shared_implout todetail::url_view_shared_implto break circular IFC deserialization (C2504), delegateconcept Ruleandconcept RangeRuletois_rule<T>::value/is_range_rule<T>::valueunderBOOST_MSVC, and promoteurldetail charsets/rules toBOOST_INLINE_CONSTEXPR.static inlinehelpers, namespace-scopeconstexpr/static consttables/tags, and dynamically initializedstatichandles toinline/BOOST_INLINE_CONSTEXPRacrossbloom.patch,charconv.patch,decimal.patch,histogram.patch,interprocess.patch(default_map_options,win32_api.hpp),json.patch,move.patch,mqtt5.patch,serialization.patch(get_singleton_module),sort.patch,system.patch(default_location),unordered.patch,winapi.patch, andBOOST_MSVC-guardedaccumulators.patch(functional*.hpp).serialization.patch(tests/dll): GateBOOST_DLLEXPORTinforce_include.hpponBOOST_ALL_DYN_LINK || BOOST_SERIALIZATION_DYN_LINKfor nativecl.exeas well, so static-Boost objects do not suppressmcpp's auto-generated.defwhen building the sharedboost.dllintests/dll.openmethod.patch: Passstd::decay_t<decltype(Fn)>tooverride_auxfor MSVC 14.52 partial specialization matching.4. Test & Documentation Updates
tests/statechart.cpp: Move#include <boost/mpl/list.hpp>beforeimport mcpplibs.mwrap.boost.statechart;(C2572).tests/describe/include_examples.cpp: Match MSVC's skippedpair<int, float>::secondline inpm_to_string.tests/test/included/example/test_case_template_example.cpp: Normalize MSVC'sboost__mpl__integral_cspelling inex_harness::normalize.tests/beast/examples_websocket.cpp: Sequenceex_http_getbeforeex_ws_exchangeinadvanced_serverinstead of relying on+evaluation order.patches/README.md&.agents/docs/2026-12-04-windows-msvc-ci-adaptations-design.md: Document all native MSVC adaptations and verification results.Verification
817035ccacross all 6 host configurations (windows-msvc,windows-llvm-msvc,linux-gccx86_64/arm64,linux-llvm,macos-llvm), including Group A/B library builds, all 417 tests,tests/dllandtests/test/utfsub-projects,examples+ template smoke tests,Verify Generation Scripts,Check Documents, andexample coverage.