Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions .github/workflows/gc-native-roots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,13 @@ jobs:
fi
llvm_bin="$llvm_root/bin"
else
# Ubuntu ships a matched opt+clang pair; take the newest present,
# and install one only if the image has none.
llvm_bin="$(dirname "$(command -v opt || true)")"
if [ ! -x "$llvm_bin/opt" ]; then
llvm_bin="$(ls -d /usr/lib/llvm-*/bin 2>/dev/null | sort -V | tail -1 || true)"
fi
if [ ! -x "$llvm_bin/opt" ]; then
sudo apt-get update -qq && sudo apt-get install -y -qq llvm clang
llvm_bin="$(dirname "$(command -v opt)")"
fi
# The setup-llvm22 action (uses: above) installs, co-locates, and
# verifies the matched LLVM 22 opt+clang pair under
# $LLVM_SYS_221_PREFIX. Consume that prefix directly — hand-rediscovery
# could resolve an unversioned /usr/bin/opt and run RS4GC on the
# distro's LLVM 18, a green gate on the wrong LLVM. The pair-check
# below stays as the assertion.
llvm_bin="${LLVM_SYS_221_PREFIX:-/usr/lib/llvm-22}/bin"
fi
if [ ! -x "$llvm_bin/opt$exe" ] || [ ! -x "$llvm_bin/clang$exe" ]; then
echo "::error::no matched opt+clang pair under $llvm_bin — RS4GC cannot run, and silently skipping it is exactly the gate that cannot fail"
Expand Down
1 change: 1 addition & 0 deletions changelog.d/7384-rs4gc-llvm22-prefix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the `native-roots-rs4gc` job's Linux LLVM discovery. It now consumes the matched LLVM 22 opt+clang pair that the `setup-llvm22` action installs and verifies under `$LLVM_SYS_221_PREFIX/bin`, instead of re-discovering `opt` by hand — which on `ubuntu-24.04-arm` could resolve an unversioned `/usr/bin/opt` and then install the distro's LLVM 18, passing the same-directory pair-check while running `opt` 18 over IR from Perry's linked LLVM 22 (a green gate on the wrong LLVM). The generic `llvm clang` fallback is removed along with the hand-discovery it lived in.
Loading