Skip to content

Commit

Permalink
Tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
pennyannn committed Aug 20, 2024
1 parent 29a4376 commit a391b42
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions scripts/build_awslc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit a391b42

Please sign in to comment.