Skip to content

Commit cbc3d72

Browse files
committed
CI: add LLVM version to its build cache
Also disallow non-version-21 LLVMs.
1 parent 24074db commit cbc3d72

File tree

2 files changed

+3
-31
lines changed

2 files changed

+3
-31
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,20 @@ jobs:
8383

8484
- name: Install LLVM
8585
run: |
86-
if [[ "${{ steps.llvm-cache-restore.outputs.cache-hit }}" != "true" ]]; then
86+
if [[ "${{ steps.llvm-${{ env.LLVM_VERSION }}-cache-restore.outputs.cache-hit }}" != "true" ]]; then
8787
echo "Cache not found. Installing LLVM..."
8888
cd openasip
8989
./tools/scripts/install_llvm_${{ env.LLVM_VERSION }}.sh ${{ github.workspace }}/local
9090
else
91-
echo "Cache hit! LLVM is already installed, skipping installation."
91+
echo "Cache hit! LLVM ${{ env.LLVM_VERSION }} is already installed, skipping installation."
9292
fi
9393
9494
- name: Save LLVM cache
9595
id: llvm-cache-save
9696
uses: actions/cache/save@v4
9797
with:
9898
path: ${{ github.workspace }}/local
99-
key: ${{ steps.llvm-cache-restore.outputs.cache-primary-key }}
99+
key: ${{ steps.llvm-${{ env.LLVM_VERSION }}-cache-restore.outputs.cache-primary-key }}
100100

101101
- name: Compile and install
102102
run: |

openasip/configure.ac

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -548,28 +548,6 @@ LLVM_INCLUDEDIR=/usr/include
548548
fi
549549
550550
case "$LLVM_VERSION" in
551-
16*)
552-
AC_DEFINE([LLVM_16], [], "Using LLVM 16")
553-
LLVM_VERSION=16
554-
LLVM_LIBRARYVERSION=16
555-
LLVM_OLDER_THAN_17=1
556-
LLVM_SHARED_LIB_FILE=$LLVM_LIBDIR/libLLVMTCE-$LLVM_LIBRARYVERSION$LIBRARY_SUFFIX
557-
LLVM_SHARED_LIB=-lLLVMTCE-$LLVM_LIBRARYVERSION
558-
LLVM_LDFLAGS="$($llvmConf --ldflags) $LLVM_SHARED_LIB"
559-
AC_DEFINE([LLVM_HAS_CUSTOM_VECTOR_EXTENSION], [2], "LLVM has the wide custom vector extension patch(wide)")
560-
AC_SUBST([LLVM_HAS_CUSTOM_VECTOR_EXTENSION], ["2"])
561-
562-
;;
563-
17*)
564-
AC_DEFINE([LLVM_17], [], "Using LLVM 17")
565-
LLVM_VERSION=17
566-
LLVM_LIBRARYVERSION=17
567-
LLVM_SHARED_LIB_FILE=$LLVM_LIBDIR/libLLVMTCE-$LLVM_LIBRARYVERSION$LIBRARY_SUFFIX
568-
LLVM_SHARED_LIB=-lLLVMTCE-$LLVM_LIBRARYVERSION
569-
LLVM_LDFLAGS="$($llvmConf --ldflags) $LLVM_SHARED_LIB"
570-
AC_DEFINE([LLVM_HAS_CUSTOM_VECTOR_EXTENSION], [2], "LLVM has the wide custom vector extension patch(wide)")
571-
AC_SUBST([LLVM_HAS_CUSTOM_VECTOR_EXTENSION], ["2"])
572-
;;
573551
21*)
574552
AC_DEFINE([LLVM_21], [], "Using LLVM 21")
575553
LLVM_VERSION=21
@@ -599,12 +577,6 @@ AC_MSG_NOTICE([
599577
])
600578

601579

602-
if test "x$LLVM_OLDER_THAN_17" == "x1";
603-
then
604-
AC_DEFINE_UNQUOTED(LLVM_OLDER_THAN_17, 1, [LLVM version is older than 17])
605-
fi
606-
607-
608580
if test ! -e $LLVM_SHARED_LIB_FILE;
609581
then
610582
# Try the alternative location where llvm.org/apt packages install it.

0 commit comments

Comments
 (0)