Skip to content

Commit

Permalink
chore: update bootstrap.sh in Barretenberg to check for clang 16 (#1717)
Browse files Browse the repository at this point in the history
As per #1542 clang 16 is needed so a proposed solution is to check
version in bootstrap.sh

---------

Co-authored-by: ludamad <[email protected]>
  • Loading branch information
Orloaft and ludamad authored Aug 22, 2023
1 parent 2e851c3 commit 87815d7
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion circuits/cpp/barretenberg/cpp/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
#!/bin/bash
set -eu
set -u

# Get the clang version string
clang_version_string=$(clang --version 2>/dev/null)

# Check if clang is installed
if [ $? -ne 0 ]; then
echo "Error: clang is not installed."
exit 1
fi

# Extract the major version number
major_version=$(echo $clang_version_string | awk -F' ' '/clang version/{print $3}' | awk -F'.' '{print $1}')

if [ "$major_version" -ge 16 ]; then
echo "clang version $major_version is good."
else
echo "Error: clang version 16 or greater is required."
exit 1
fi

set -e

# Clean.
rm -rf ./build
Expand Down

0 comments on commit 87815d7

Please sign in to comment.