diff --git a/CHANGELOG.md b/CHANGELOG.md index ad32fea..ac39bb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ Notable changes are grouped by release. See [all releases](https://github.com/Co ## Unreleased +- Building requires LLVM 20. CMake rejects an older LLVM when it configures the build, where + LLVM 19 passed that check and then failed to compile. On macOS, `scripts/build.sh` looks for + Homebrew `llvm@20` before `llvm`, a later version, and no longer for `llvm@19` or `llvm@18`. +- The GitHub Action accepts `llvm-version: 20` only. On a runner for which apt.llvm.org + publishes no LLVM 20 packages, such as `ubuntu-26.04`, it stops with an error before + installing LLVM (#255). - StackBufferOverflow and MultipleStoresToStackBuffer resolve each pointer variable to its stack array once per function, by strongly connected components: pointer variables assigned from one another no longer make the analysis walk every path between them, diff --git a/CMakeLists.txt b/CMakeLists.txt index 8539319..516ff4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,8 +7,7 @@ include(CheckLLVMVersion OPTIONAL) include(CheckCXXCompilerFlag) if(COMMAND check_llvm_version) - set(LLVM_MIN_REQUIRED_VERSION "19" CACHE STRING "Minimum required LLVM version") - check_llvm_version(${LLVM_MIN_REQUIRED_VERSION}) + check_llvm_version(20) else() message(WARNING "check_llvm_version() not available, skipping LLVM version check") endif() diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 57d7aba..60f80e2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ This document defines the expected workflow for code, tests, and pull requests. Prerequisites: - CMake `>= 3.16` -- LLVM/Clang `>= 19` (20 recommended) +- LLVM/Clang 20 - A C++20 compiler Build: diff --git a/README.md b/README.md index 0f0d00b..420cbbd 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ #### BUILD (macOS/Linux) +The analyzer builds with LLVM and Clang 20 only. On macOS, install them with +`brew install llvm@20`, not `llvm`, which is a later version. On Ubuntu, install +`llvm-20-dev`, `libclang-20-dev` and `clang-20` from apt.llvm.org. + ```zsh ./build.sh ``` diff --git a/scripts/build.sh b/scripts/build.sh index 8fa04c3..fd1acfa 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -219,7 +219,7 @@ detect_from_brew() { local formula local prefix - for formula in llvm llvm@20 llvm@19 llvm@18; do + for formula in llvm@20 llvm; do prefix="$(brew --prefix "$formula" 2>/dev/null || true)" if [ -n "$prefix" ] && [ -d "$prefix" ]; then if [ -z "$LLVM_DIR" ] && [ -d "$prefix/lib/cmake/llvm" ]; then