Skip to content

Commit

Permalink
chore: Update build-macos.sh script to use OpenSSL version 3 and para…
Browse files Browse the repository at this point in the history
…llelize the build process
  • Loading branch information
royshil committed Jul 15, 2024
1 parent 1a206c4 commit 1a99ae0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions build-macos.sh
Original file line number Diff line number Diff line change
@@ -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 .
Expand All @@ -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

0 comments on commit 1a99ae0

Please sign in to comment.