Skip to content

Commit

Permalink
Updated llvm install script
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Nov 12, 2024
1 parent a27fb7e commit fb77745
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/actions/install-llvm/llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ usage() {
exit 1;
}

CURRENT_LLVM_STABLE=16
CURRENT_LLVM_STABLE=18
BASE_URL="http://apt.llvm.org"

# Check for required tools
Expand Down Expand Up @@ -125,7 +125,10 @@ LLVM_VERSION_PATTERNS[13]="-13"
LLVM_VERSION_PATTERNS[14]="-14"
LLVM_VERSION_PATTERNS[15]="-15"
LLVM_VERSION_PATTERNS[16]="-16"
LLVM_VERSION_PATTERNS[17]=""
LLVM_VERSION_PATTERNS[17]="-17"
LLVM_VERSION_PATTERNS[18]="-18"
LLVM_VERSION_PATTERNS[19]="-19"
LLVM_VERSION_PATTERNS[20]=""

if [ ! ${LLVM_VERSION_PATTERNS[$LLVM_VERSION]+_} ]; then
echo "This script does not support LLVM version $LLVM_VERSION"
Expand Down Expand Up @@ -161,9 +164,15 @@ if [[ -z "`apt-key list 2> /dev/null | grep -i llvm`" ]]; then
# Delete the key in the old format
apt-key del AF4F7421
fi
add-apt-repository "${REPO_NAME}"
if [[ "${VERSION_CODENAME}" == "bookworm" ]]; then
# add it twice to workaround:
# https://github.com/llvm/llvm-project/issues/62475
add-apt-repository -y "${REPO_NAME}"
fi

add-apt-repository -y "${REPO_NAME}"
apt-get update
PKG="clang-$LLVM_VERSION" # lldb-$LLVM_VERSION lld-$LLVM_VERSION clangd-$LLVM_VERSION"
PKG="clang-$LLVM_VERSION lldb-$LLVM_VERSION lld-$LLVM_VERSION clangd-$LLVM_VERSION"
if [[ $ALL -eq 1 ]]; then
# same as in test-install.sh
# No worries if we have dups
Expand Down

0 comments on commit fb77745

Please sign in to comment.