Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/scripts/libmongocrypt.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
8 changes: 4 additions & 4 deletions .github/scripts/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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<major>.<minor>`.
// libmongocrypt's creates release branches for minor releases in the form `r<major>.<minor>`.
// Any patches made to this branch are committed as tags in the form <major>.<minor>.<patch>.
// So, the branch that is used for the AWS s3 upload is `r<major>.<minor>` and the commit hash
// is the commit hash we parse from the `getCommitFromRef()` (which handles switching to git tags and
Expand All @@ -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`;
}
Expand Down Expand Up @@ -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() {
Expand Down
Loading