diff --git a/scripts/build_awslc.sh b/scripts/build_awslc.sh index bddcb1b1..8a17f77f 100755 --- a/scripts/build_awslc.sh +++ b/scripts/build_awslc.sh @@ -10,16 +10,24 @@ set -o xtrace # Remember where LNSym is LNSym_DIR=${PWD} -# Install dependencies -brew install ninja golang +# Install dependencies\ +brew install ninja -# Fetching and building AWS-LC +GOROOT=/usr/local/go +PATH="$GOROOT/bin:$PATH" +GO_VERSION=1.20.1 +GO_ARCHIVE="go${GO_VERSION}.linux-amd64.tar.gz" +wget "https://dl.google.com/go/${GO_ARCHIVE}" && tar -xvf $GO_ARCHIVE && \ + mkdir $GOROOT && mv go/* $GOROOT && rm $GO_ARCHIVE + +# Fetching AWS-LC git clone https://github.com/aws/aws-lc.git $HOME/aws-lc --depth 1 -cd $HOME/aws-lc; mkdir aws-lc-build; cd aws-lc-build -cmake -GNinja -DKEEP_ASM_LOCAL_SYMBOLS=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo ../ -ninja +cd $HOME/aws-lc +# Build AWS-LC +NUM_CPU_THREADS=$(sysctl -n hw.ncpu) +mkdir aws-lc-build; cd aws-lc-build +cmake -Gninja -DKEEP_ASM_LOCAL_SYMBOLS=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo ../ +make -j${NUM_CPU_THREADS} # Move crypto_test to LNSym cp -f crypto/crypto_test ${LNSym_DIR}/Tests/ELFParser/Data/crypto_test - -cd ${LNSym_DIR}