Disable vcpkg applocal for static Windows builds - #1023
Open
thedavidweng wants to merge 1 commit into
Open
Conversation
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.
Fixes the recurring Windows CI flake where the Release build fails with MSB3073 (exit code 32, sharing violation) in the vcpkg post-build step, e.g. 'vcpkg.exe z-applocal --target-binary=.../projectM-unittest.exe'.
Root cause: that post-build step exists only to deploy dependent DLLs next to executables (VCPKG_APPLOCAL_DEPS in the vcpkg toolchain). The static matrix legs use -static triplets with a static CRT and fully static linking, so there are no DLLs to deploy, the step is a no-op that still opens the freshly linked exe, exposing the build to a file-lock race (Defender scan / concurrent post-build events of the two unittest projects).
Change: pass -DVCPKG_APPLOCAL_DEPS=OFF whenever matrix.libs == static, in both configure blocks (main build and C++ interface test). Shared legs are untouched and keep DLL deployment for ctest. No build-output change: static executables are self-contained, and install/upload steps are unaffected.