Browse Source

ci: update to LLVM 20 on MacOS and Linux CI and releases

Laytan 5 months ago
parent
commit
b0316b7076
4 changed files with 14 additions and 14 deletions
  1. 4 4
      .github/workflows/ci.yml
  2. 7 7
      .github/workflows/nightly.yml
  3. 1 1
      build_odin.sh
  4. 2 2
      ci/build_linux_static.sh

+ 4 - 4
.github/workflows/ci.yml

@@ -93,14 +93,14 @@ jobs:
       - name: Download LLVM (MacOS Intel)
       - name: Download LLVM (MacOS Intel)
         if: matrix.os == 'macos-13'
         if: matrix.os == 'macos-13'
         run: |
         run: |
-          brew install llvm@18 [email protected]
-          echo "/usr/local/opt/llvm@18/bin" >> $GITHUB_PATH
+          brew install llvm@20 [email protected] lld
+          echo "/usr/local/opt/llvm@20/bin" >> $GITHUB_PATH
 
 
       - name: Download LLVM (MacOS ARM)
       - name: Download LLVM (MacOS ARM)
         if: matrix.os == 'macos-14'
         if: matrix.os == 'macos-14'
         run: |
         run: |
-          brew install llvm@18 wasmtime [email protected]
-          echo "/opt/homebrew/opt/llvm@18/bin" >> $GITHUB_PATH
+          brew install llvm@20 wasmtime [email protected] lld
+          echo "/opt/homebrew/opt/llvm@20/bin" >> $GITHUB_PATH
 
 
       - name: Build Odin
       - name: Build Odin
         run: ./build_odin.sh release
         run: ./build_odin.sh release

+ 7 - 7
.github/workflows/nightly.yml

@@ -49,12 +49,12 @@ jobs:
       - uses: actions/checkout@v4
       - uses: actions/checkout@v4
       - uses: jirutka/setup-alpine@v1
       - uses: jirutka/setup-alpine@v1
         with:
         with:
-          branch: v3.20
+          branch: edge
       - name: (Linux) Download LLVM
       - name: (Linux) Download LLVM
         run: |
         run: |
           apk add --no-cache \
           apk add --no-cache \
-          musl-dev llvm18-dev clang18 git mold lz4 \
-          libxml2-static llvm18-static zlib-static zstd-static \
+          musl-dev llvm20-dev clang20 git mold lz4 \
+          libxml2-static llvm20-static zlib-static zstd-static \
           make
           make
         shell: alpine.sh --root {0}
         shell: alpine.sh --root {0}
       - name: build odin
       - name: build odin
@@ -93,8 +93,8 @@ jobs:
       - uses: actions/checkout@v4
       - uses: actions/checkout@v4
       - name: Download LLVM and setup PATH
       - name: Download LLVM and setup PATH
         run: |
         run: |
-          brew install llvm@18 dylibbundler
-          echo "/usr/local/opt/llvm@18/bin" >> $GITHUB_PATH
+          brew install llvm@20 dylibbundler lld
+          echo "/usr/local/opt/llvm@20/bin" >> $GITHUB_PATH
       - name: build odin
       - name: build odin
         # These -L makes the linker prioritize system libraries over LLVM libraries, this is mainly to
         # These -L makes the linker prioritize system libraries over LLVM libraries, this is mainly to
         # not link with libunwind bundled with LLVM but link with libunwind on the system.
         # not link with libunwind bundled with LLVM but link with libunwind on the system.
@@ -130,8 +130,8 @@ jobs:
       - uses: actions/checkout@v4
       - uses: actions/checkout@v4
       - name: Download LLVM and setup PATH
       - name: Download LLVM and setup PATH
         run: |
         run: |
-          brew install llvm@18 dylibbundler
-          echo "/opt/homebrew/opt/llvm@18/bin" >> $GITHUB_PATH
+          brew install llvm@20 dylibbundler lld
+          echo "/opt/homebrew/opt/llvm@20/bin" >> $GITHUB_PATH
       - name: build odin
       - name: build odin
         # These -L makes the linker prioritize system libraries over LLVM libraries, this is mainly to
         # These -L makes the linker prioritize system libraries over LLVM libraries, this is mainly to
         # not link with libunwind bundled with LLVM but link with libunwind on the system.
         # not link with libunwind bundled with LLVM but link with libunwind on the system.

+ 1 - 1
build_odin.sh

@@ -25,7 +25,7 @@ error() {
 
 
 # Brew advises people not to add llvm to their $PATH, so try and use brew to find it.
 # Brew advises people not to add llvm to their $PATH, so try and use brew to find it.
 if [ -z "$LLVM_CONFIG" ] &&  [ -n "$(command -v brew)" ]; then
 if [ -z "$LLVM_CONFIG" ] &&  [ -n "$(command -v brew)" ]; then
-    if   [ -n "$(command -v $(brew --prefix llvm)/bin/llvm-config)"    ]; then LLVM_CONFIG="$(brew --prefix llvm)/bin/llvm-config"
+    if   [ -n "$(command -v $(brew --prefix llvm@20)/bin/llvm-config)" ]; then LLVM_CONFIG="$(brew --prefix llvm@20)/bin/llvm-config"
     elif [ -n "$(command -v $(brew --prefix llvm@19)/bin/llvm-config)" ]; then LLVM_CONFIG="$(brew --prefix llvm@19)/bin/llvm-config"
     elif [ -n "$(command -v $(brew --prefix llvm@19)/bin/llvm-config)" ]; then LLVM_CONFIG="$(brew --prefix llvm@19)/bin/llvm-config"
     elif [ -n "$(command -v $(brew --prefix llvm@18)/bin/llvm-config)" ]; then LLVM_CONFIG="$(brew --prefix llvm@18)/bin/llvm-config"
     elif [ -n "$(command -v $(brew --prefix llvm@18)/bin/llvm-config)" ]; then LLVM_CONFIG="$(brew --prefix llvm@18)/bin/llvm-config"
     elif [ -n "$(command -v $(brew --prefix llvm@17)/bin/llvm-config)" ]; then LLVM_CONFIG="$(brew --prefix llvm@17)/bin/llvm-config"
     elif [ -n "$(command -v $(brew --prefix llvm@17)/bin/llvm-config)" ]; then LLVM_CONFIG="$(brew --prefix llvm@17)/bin/llvm-config"

+ 2 - 2
ci/build_linux_static.sh

@@ -1,8 +1,8 @@
 #!/usr/bin/env sh
 #!/usr/bin/env sh
 # Intended for use in Alpine containers, see the "nightly" Github action for a list of dependencies
 # Intended for use in Alpine containers, see the "nightly" Github action for a list of dependencies
 
 
-CXX="clang++-18"
-LLVM_CONFIG="llvm-config-18"
+CXX="clang++-20"
+LLVM_CONFIG="llvm-config-20"
 
 
 DISABLED_WARNINGS="-Wno-switch -Wno-macro-redefined -Wno-unused-value"
 DISABLED_WARNINGS="-Wno-switch -Wno-macro-redefined -Wno-unused-value"