diff --git a/.github/scripts/libmongocrypt.mjs b/.github/scripts/libmongocrypt.mjs index 00bb205..620da6e 100644 --- a/.github/scripts/libmongocrypt.mjs +++ b/.github/scripts/libmongocrypt.mjs @@ -99,8 +99,16 @@ export async function buildLibMongoCrypt(libmongocryptRoot, nodeDepsRoot, option }); const WINDOWS_CMAKE_FLAGS = - process.platform === 'win32' // Windows is still called "win32" when it is 64-bit - ? toCLIFlags({ Thost: 'x64', A: 'x64', DENABLE_WINDOWS_STATIC_RUNTIME: 'ON' }) + process.platform === 'win32' + ? toCLIFlags({ + // Tell CMake that binaries should link with the static MSVC runtime instead of + // the default dynamic one. + DCMAKE_MSVC_RUNTIME_LIBRARY: 'MultiThreaded', + // Tell CMake to use the MSVC 64-bit compiler toolchain + T: 'host=x64', + // Tell CMake to generate a 64-bit binaries + A: 'x64', + }) : []; const DARWIN_CMAKE_FLAGS = diff --git a/.github/scripts/utils.mjs b/.github/scripts/utils.mjs index 45d408d..65ef1a5 100644 --- a/.github/scripts/utils.mjs +++ b/.github/scripts/utils.mjs @@ -38,7 +38,7 @@ export function buildLibmongocryptDownloadUrl(ref, platform) { const [major, minor, _patch] = ref.split('.'); // Just a note: it may appear that this logic _doesn't_ support patch releases but it actually does. - // libmongocrypt's creates release branches for minor releases in the form `r.`. + // libmongocrypt's creates release branches for minor releases in the form `r.`. // Any patches made to this branch are committed as tags in the form ... // So, the branch that is used for the AWS s3 upload is `r.` and the commit hash // is the commit hash we parse from the `getCommitFromRef()` (which handles switching to git tags and @@ -49,7 +49,7 @@ export function buildLibmongocryptDownloadUrl(ref, platform) { } // just a note here - `master` refers to the branch, the hash is the commit on that branch. - // if we ever need to download binaries from a non-master branch (or non-release branch), + // if we ever need to download binaries from a non-master branch (or non-release branch), // this will need to be modified somehow. return `https://mciuploads.s3.amazonaws.com/libmongocrypt/${platform}/master/${hash}/libmongocrypt.tar.gz`; } @@ -98,9 +98,9 @@ function getLibc() { if (process.platform !== 'linux') return null; /** - * executes `ldd --version`. on Alpine linux, `ldd` and `ldd --version` return exit code 1 and print the version + * Executes `ldd --version`. on Alpine linux, `ldd` and `ldd --version` return exit code 1 and print the version * info to stderr, but on other platforms, `ldd --version` prints to stdout and returns exit code 0. - * + * * So, this script works on both by return stderr if the command returns a non-zero exit code, otherwise stdout. */ function lddVersion() {