Add C11 and C17 conformance coverage with VS 2017 #1294
Merged
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.
Description
This PR resolves CDRIVER-4549 by adding a
vs2017x64
task to thestd-matrix
EVG variant and resolves CDRIVER-4334 by removing use of the rhel62 variant. Verified by this patch.windows-64-vs2017 -> windows-vsCurrent
As recommended by the distro guidelines, this PR moves all tasks that require the VS 2017 compiler to the "windows-vsCurrent" distro. Tasks that ran on "windows-64-vs2017-test" in the legacy config were moved to "windows-vsCurrent-large".
The task naming convention uses the Windows Server version for the specified distro rather than vsCurrent to avoid redundancy/confusion about the VS version being used. e.g. the "cse-sasl-cyrus-openssl-vs2017-x64-compile" which ran on windows-64-vs2017 is now named "cse-sasl-cyrus-openssl-windows-2019-vs2017-x64-compile" and runs on "windows-vsCurrent".
This migration required updating the "debug-compile-aws" task to use "find-cmake-latest.sh", as the CMake binary selected by "find-cmake.sh" is broken on the "windows-vsCurrent" distro (cannot find MSBuild.exe during CMake configuration).
VS 2022 Compatibility
Although the C Driver has no issues with VS 2022 compatibility, libmongocrypt needed a patch (106768d) in CSE tasks to address an internal compiler error. Applied a cherry-pick of the required patch to minimize changes relative to the 1.8.0 release, which may be removed once the commit is included in the latest minimum libmongocrypt version (bump from 1.8.0).
RHEL 6.2 Removal
As a drive-by improvement, removed references to the "rhel62" distro as well, which also obviated some test skips.
C11 and C17 Coverage on Windows
The primary goal of this PR. Given we now use "find-latest-cmake.sh" with CMake version 3.25.2, the
CMAKE_C_STANDARD
workaround is no longer necessary and was thus removed.Use of
/std:cXY
was complicated by Windows 10 SDK header files not being standard-conforming. This was worked-around by specifying a patched version of the Windows 10 SDK via CMAKE_SYSTEM_VERSION. Alas not all warnings are addressed, so/wd5105
was also added to compiler flags.Miscellaneous
cmake --build
for platform-independent command consistency as well as to address the occasional absence of the "all" target when using the VS 2017 generator (when/why?).find_cmake_latest
whenfind-cmake-latest.sh
is sourced.