Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update bootstrap.sh in Barretenberg to check for clang 16 #1717

Merged
merged 10 commits into from
Aug 22, 2023
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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: technically, since this script has -e, we would never hit the


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

case

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add the set -e after this


# 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