-
Notifications
You must be signed in to change notification settings - Fork 7
Consolidate MSVC libraries to unified msvc directory for 60% package size reduction #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
|
@copilot 我看到了你的改动, 但我认为还应该继续改进。 |
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
已完成改进!已将 改进内容:
优势: 相关提交:2a8c1cf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR consolidates MSVC static libraries from version-specific directories (vs2017, vs2019, vs2022, vs2026) into a unified msvc directory, leveraging ABI compatibility across Visual Studio 2015+ versions that share the Universal CRT. This optimization reduces the distribution package size by approximately 60% (from 86MB to 34MB in the lib/ directory).
Key changes include:
- Simplified CMakeLists.txt logic to use a single
msvc/{x64,x86}path for all MSVC versions ≥ VS2017 - Updated build scripts to sync only the unified msvc libraries
- Comprehensive documentation of the technical rationale for ABI compatibility and the consolidation approach
Reviewed changes
Copilot reviewed 6 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| CMakeLists.txt | Consolidated MSVC version checks from 4 separate branches into a single MSVC_VERSION >= 1910 check that uses msvc/{x64,x86} libraries |
| update-libs.sh | Removed vs2017/2022/2026 from copy mapping arrays, now only syncs unified msvc directory |
| lib/vs2017/, lib/vs2022/, lib/vs2026/* | Deleted 12 obsolete library files (4 per version, x86/x64 Debug/Release) |
| doc/MSVC-Library-Consolidation.md | New technical documentation explaining ABI compatibility rationale and implementation details |
| doc/Release-25.11.md | Added release notes about MSVC library consolidation and package size reduction |
| README.md | Updated changelog to mention MSVC library consolidation strategy |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ## 更新日志 | ||
|
|
||
| - **2025.11**: 首次实施 MSVC 库整合策略,减少发布包体积约 52MB |
Copilot
AI
Dec 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version number should be "25.11" not "2025.11" to match the version format used elsewhere in the document (see line 5 which refers to "EGE 25.11 版本").
| - **2025.11**: 首次实施 MSVC 库整合策略,减少发布包体积约 52MB | |
| - **25.11**: 首次实施 MSVC 库整合策略,减少发布包体积约 52MB |
|
@Auggie review |
🤖 Augment PR SummarySummary: This PR reduces the Windows/MSVC SDK footprint by consolidating multiple Visual Studio version-specific static library folders into a single shared Changes:
Technical Notes: Debug/Release libraries remain separate ( 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if(MSVC) | ||
| # 设置 MSVC 编译选项, 当版本大于 vs2019 时, 使用 c++17 标准. | ||
| # 设置 MSVC 编译选项, 使用 c++17 标准. | ||
| set(CPP_COMPILE_OPTIONS "/std:c++17") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ### VS2015 及更早版本 | ||
|
|
||
| VS2015 及更早版本仍然使用独立的库文件: | ||
| - VS2015: `lib/vs2015/` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
现有发布包针对 VS2017-VS2026 分别提供独立静态库,导致包体积过大(lib/ 目录 86MB)。利用 MSVC ABI 兼容性(VS2015+ 共享 Universal CRT),统一使用同一套 MSVC 编译的静态库支持所有现代 Visual Studio 版本。
Changes
Build system
MSVC_VERSION >= 1910now usemsvc/{x64,x86}librariesDistribution
Documentation
Impact
#pragma commentmsvcdirectory name better indicates cross-version compatibilityTechnical Details
Why unified msvc directory: Using generic
msvcnaming instead of version-specificvs2019better expresses cross-version compatibility and avoids confusion about which VS version the libraries targetDebug/Release separation maintained:
graphicsd.libvsgraphics.libstill separate due to_ITERATOR_DEBUG_LEVELand STL layout incompatibility between build typesOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.