From b0316b7076c9954383574f65fc135db16f17c1c0 Mon Sep 17 00:00:00 2001 From: Laytan Date: Wed, 2 Apr 2025 21:13:10 +0200 Subject: [PATCH 1/4] ci: update to LLVM 20 on MacOS and Linux CI and releases --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/nightly.yml | 14 +++++++------- build_odin.sh | 2 +- ci/build_linux_static.sh | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ede32f093..15bfe81cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,14 +93,14 @@ jobs: - name: Download LLVM (MacOS Intel) if: matrix.os == 'macos-13' run: | - brew install llvm@18 lua@5.4 - echo "/usr/local/opt/llvm@18/bin" >> $GITHUB_PATH + brew install llvm@20 lua@5.4 lld + echo "/usr/local/opt/llvm@20/bin" >> $GITHUB_PATH - name: Download LLVM (MacOS ARM) if: matrix.os == 'macos-14' run: | - brew install llvm@18 wasmtime lua@5.4 - echo "/opt/homebrew/opt/llvm@18/bin" >> $GITHUB_PATH + brew install llvm@20 wasmtime lua@5.4 lld + echo "/opt/homebrew/opt/llvm@20/bin" >> $GITHUB_PATH - name: Build Odin run: ./build_odin.sh release diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 314711efb..dfacc2712 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -49,12 +49,12 @@ jobs: - uses: actions/checkout@v4 - uses: jirutka/setup-alpine@v1 with: - branch: v3.20 + branch: edge - name: (Linux) Download LLVM run: | 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 shell: alpine.sh --root {0} - name: build odin @@ -93,8 +93,8 @@ jobs: - uses: actions/checkout@v4 - name: Download LLVM and setup PATH 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 # 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. @@ -130,8 +130,8 @@ jobs: - uses: actions/checkout@v4 - name: Download LLVM and setup PATH 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 # 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. diff --git a/build_odin.sh b/build_odin.sh index 773958d5f..19bb82a11 100755 --- a/build_odin.sh +++ b/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. 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@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" diff --git a/ci/build_linux_static.sh b/ci/build_linux_static.sh index f821cbb59..2eb99116e 100755 --- a/ci/build_linux_static.sh +++ b/ci/build_linux_static.sh @@ -1,8 +1,8 @@ #!/usr/bin/env sh # 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" From cab323976023fe682cc6101b205fc6dba5e98b2a Mon Sep 17 00:00:00 2001 From: Laytan Date: Wed, 2 Apr 2025 21:17:45 +0200 Subject: [PATCH 2/4] ci: fix macos llvm 20 --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/nightly.yml | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15bfe81cf..9ffdf0c8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,14 +93,14 @@ jobs: - name: Download LLVM (MacOS Intel) if: matrix.os == 'macos-13' run: | - brew install llvm@20 lua@5.4 lld - echo "/usr/local/opt/llvm@20/bin" >> $GITHUB_PATH + brew install llvm lua@5.4 lld + brew --prefix llvm@20 # Verifies it is LLVM 20 - name: Download LLVM (MacOS ARM) if: matrix.os == 'macos-14' run: | - brew install llvm@20 wasmtime lua@5.4 lld - echo "/opt/homebrew/opt/llvm@20/bin" >> $GITHUB_PATH + brew install llvm wasmtime lua@5.4 lld + brew --prefix llvm@20 # Verifies it is LLVM 20 - name: Build Odin run: ./build_odin.sh release diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index dfacc2712..b137c0ee8 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -93,8 +93,9 @@ jobs: - uses: actions/checkout@v4 - name: Download LLVM and setup PATH run: | - brew install llvm@20 dylibbundler lld - echo "/usr/local/opt/llvm@20/bin" >> $GITHUB_PATH + brew install llvm dylibbundler lld + brew --prefix llvm@20 # Verifies it is LLVM 20 + - name: build odin # 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. @@ -130,8 +131,9 @@ jobs: - uses: actions/checkout@v4 - name: Download LLVM and setup PATH run: | - brew install llvm@20 dylibbundler lld - echo "/opt/homebrew/opt/llvm@20/bin" >> $GITHUB_PATH + brew install llvm dylibbundler lld + brew --prefix llvm@20 # Verifies it is LLVM 20 + - name: build odin # 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. From 85b3a79a258d1e39d3cf83b3e56d11ffee7924be Mon Sep 17 00:00:00 2001 From: Laytan Date: Wed, 2 Apr 2025 21:22:18 +0200 Subject: [PATCH 3/4] ci: brew update? --- .github/workflows/ci.yml | 2 ++ .github/workflows/nightly.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ffdf0c8c..860ba08a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,12 +93,14 @@ jobs: - name: Download LLVM (MacOS Intel) if: matrix.os == 'macos-13' run: | + brew update brew install llvm lua@5.4 lld brew --prefix llvm@20 # Verifies it is LLVM 20 - name: Download LLVM (MacOS ARM) if: matrix.os == 'macos-14' run: | + brew update brew install llvm wasmtime lua@5.4 lld brew --prefix llvm@20 # Verifies it is LLVM 20 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index b137c0ee8..76052743c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -93,6 +93,7 @@ jobs: - uses: actions/checkout@v4 - name: Download LLVM and setup PATH run: | + brew update brew install llvm dylibbundler lld brew --prefix llvm@20 # Verifies it is LLVM 20 @@ -131,6 +132,7 @@ jobs: - uses: actions/checkout@v4 - name: Download LLVM and setup PATH run: | + brew update brew install llvm dylibbundler lld brew --prefix llvm@20 # Verifies it is LLVM 20 From 4eef57c6f1f7e64f774e6982902dc5e85e740a38 Mon Sep 17 00:00:00 2001 From: Laytan Date: Wed, 2 Apr 2025 21:24:12 +0200 Subject: [PATCH 4/4] ci: ok, had to brew update, can we now request @20 directly? --- .github/workflows/ci.yml | 6 ++---- .github/workflows/nightly.yml | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 860ba08a5..1a1d18231 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,15 +94,13 @@ jobs: if: matrix.os == 'macos-13' run: | brew update - brew install llvm lua@5.4 lld - brew --prefix llvm@20 # Verifies it is LLVM 20 + brew install llvm@20 lua@5.4 lld - name: Download LLVM (MacOS ARM) if: matrix.os == 'macos-14' run: | brew update - brew install llvm wasmtime lua@5.4 lld - brew --prefix llvm@20 # Verifies it is LLVM 20 + brew install llvm@20 wasmtime lua@5.4 lld - name: Build Odin run: ./build_odin.sh release diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 76052743c..eb67eb209 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -94,8 +94,7 @@ jobs: - name: Download LLVM and setup PATH run: | brew update - brew install llvm dylibbundler lld - brew --prefix llvm@20 # Verifies it is LLVM 20 + brew install llvm@20 dylibbundler lld - name: build odin # These -L makes the linker prioritize system libraries over LLVM libraries, this is mainly to @@ -133,8 +132,7 @@ jobs: - name: Download LLVM and setup PATH run: | brew update - brew install llvm dylibbundler lld - brew --prefix llvm@20 # Verifies it is LLVM 20 + brew install llvm@20 dylibbundler lld - name: build odin # These -L makes the linker prioritize system libraries over LLVM libraries, this is mainly to