From 1a99ae00f200b154b390defc64ce6ab5623c325a Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Mon, 15 Jul 2024 10:36:23 -0400 Subject: [PATCH] chore: Update build-macos.sh script to use OpenSSL version 3 and parallelize the build process --- build-macos.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/build-macos.sh b/build-macos.sh index 613adbf..e344052 100755 --- a/build-macos.sh +++ b/build-macos.sh @@ -1,6 +1,8 @@ #!/bin/bash OPENSSL_VERSION="3.3.1" +OPENSSL_VERSION_SHORT="3" +NUM_CORES=$(sysctl -n hw.logicalcpu) wget https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz tar -xvzf openssl-$OPENSSL_VERSION.tar.gz -C . @@ -9,13 +11,18 @@ cp -r openssl_arm64 openssl_x86_64 cd openssl_arm64 ./Configure shared darwin64-arm64-cc -make +make -j$NUM_CORES cd ../ cd openssl_x86_64 ./Configure shared darwin64-x86_64-cc -make +make -j$NUM_CORES cd ../ -lipo -create openssl_arm64/libcrypto.$OPENSSL_VERSION.dylib openssl_x86_64/libcrypto.$OPENSSL_VERSION.dylib -output libcrypto.$OPENSSL_VERSION.dylib -lipo -create openssl_arm64/libssl.$OPENSSL_VERSION.dylib openssl_x86_64/libssl.$OPENSSL_VERSION.dylib -output libssl.$OPENSSL_VERSION.dylib + +lipo -create openssl_arm64/libcrypto.$OPENSSL_VERSION_SHORT.dylib \ + openssl_x86_64/libcrypto.$OPENSSL_VERSION_SHORT.dylib \ + -output libcrypto.$OPENSSL_VERSION_SHORT.dylib +lipo -create openssl_arm64/libssl.$OPENSSL_VERSION_SHORT.dylib \ + openssl_x86_64/libssl.$OPENSSL_VERSION_SHORT.dylib \ + -output libssl.$OPENSSL_VERSION_SHORT.dylib