Skip to content

Commit 7797550

Browse files
committed
Support building OpenSSL on M1 macs
1 parent 887b3bb commit 7797550

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

utils/acquireOpenSSL.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@ class HashVerify extends stream.Transform {
4141
}
4242

4343
const buildDarwin = async (buildCwd, macOsDeploymentTarget) => {
44-
await execPromise(`./Configure darwin64-x86_64-cc no-shared enable-ec_nistp_64_gcc_128 no-ssl2 no-ssl3 no-comp --prefix="${
44+
const triplet = process.arch === 'x64'
45+
? 'darwin64-x86_64-cc'
46+
: 'darwin64-arm64-cc';
47+
48+
await execPromise(`./Configure ${
49+
triplet
50+
} no-shared enable-ec_nistp_64_gcc_128 no-ssl2 no-ssl3 no-comp --prefix="${
4551
extractPath
4652
}" --openssldir="${extractPath}" -mmacosx-version-min=${macOsDeploymentTarget}`, {
4753
cwd: buildCwd

0 commit comments

Comments
 (0)