Pin MSVC toolchain and add automatic min version check#2296
Merged
Conversation
This will run immediately on a process loading LiteCore into its process space. # Conflicts: # CMakeLists.txt # jenkins/build_server_win.ps1
There was a problem hiding this comment.
Pull Request Overview
This PR pins the MSVC toolchain version and adds an automatic minimum version check for msvcp140.dll to help ensure process stability. Key changes include:
- Updating job scripts (jenkins_win.ps1 and build_server_win.ps1) to use a fixed MSVC toolchain version.
- Modifying the build configuration in CMakeLists.txt and platform_win.cmake to improve parallel build settings.
- Introducing a new DLL (MSVC/dllmain.c) that performs a runtime version check on msvcp140.dll.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| jenkins/jenkins_win.ps1 | Adds toolchain version flag and uses NUMBER_OF_PROCESSORS for build. |
| jenkins/build_server_win.ps1 | Introduces MSVC toolchain version specification in build script. |
| cmake/platform_win.cmake | Adds parallel build options and updates Minsizerel flags. |
| MSVC/dllmain.c | Implements automatic runtime version check for msvcp140.dll. |
| CMakeLists.txt | Updates shared library build process to include dllmain.c on MSVC. |
Comment on lines
+83
to
+84
| loaded.major, loaded.minor, loaded.revision, loaded.build, expected.major, expected.minor, | ||
| expected.revision, expected.build); |
There was a problem hiding this comment.
The order of version numbers is inconsistent with the defined version structure; the 'build' value should be printed before the 'revision' to correctly reflect the version as major.minor.build.revision.
Suggested change
| loaded.major, loaded.minor, loaded.revision, loaded.build, expected.major, expected.minor, | |
| expected.revision, expected.build); | |
| loaded.major, loaded.minor, loaded.build, loaded.revision, expected.major, expected.minor, | |
| expected.build, expected.revision); |
|
Code Coverage Results:
|
jianminzhao
approved these changes
Jun 27, 2025
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.
This will run immediately on a process loading LiteCore into its process space.