From 775ccd46780ce908740659b0d0f01b5b604936ab Mon Sep 17 00:00:00 2001 From: bjjwwang Date: Sat, 2 May 2026 20:00:37 +1000 Subject: [PATCH 1/2] Sync to upstream SVF: LLVM 21.1.0, drop ubuntu-toolchain-r PPA Match the upstream SVF/build.sh pin (MajorLLVMVer=21) and remove the ppa:ubuntu-toolchain-r/test add-apt-repository step. Launchpad's PPA infrastructure has been intermittently unreachable from CI runners (HTTP 504 / 2-minute timeout from add-apt-repository), and ubuntu-24.04's default gcc-13 is sufficient for the SVF example build. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/svf-example-build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/svf-example-build.yml b/.github/workflows/svf-example-build.yml index 0de005e..a6866d3 100644 --- a/.github/workflows/svf-example-build.yml +++ b/.github/workflows/svf-example-build.yml @@ -33,10 +33,10 @@ jobs: - name: ubuntu-setup if: runner.os == 'Linux' run: | + # Avoid ppa:ubuntu-toolchain-r/test — Launchpad's PPA infrastructure + # has been intermittently unreachable from CI runners (HTTP 504 from + # add-apt-repository), and ubuntu-24.04's default gcc-13 is sufficient. sudo apt-get update - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install cmake gcc g++ nodejs doxygen graphviz sudo apt-get install -y build-essential cmake gcc g++ nodejs doxygen graphviz git curl software-properties-common lcov libncurses5-dev libtinfo6 libzstd-dev libffi-dev zlib1g-dev # install llvm and svf @@ -48,7 +48,7 @@ jobs: - name: build-svf-example run: | export SVF_DIR=$(npm root)/SVF - export LLVM_DIR=$(npm root)/llvm-18.1.0.obj + export LLVM_DIR=$(npm root)/llvm-21.1.0.obj export Z3_DIR=$(npm root)/z3.obj cmake -B build -S ./ --install-prefix=$GITHUB_WORKSPACE/preinstall_svf cmake --build build --verbose From c6fc3912d01eaabf3ecce1ac0445bce9af54a975 Mon Sep 17 00:00:00 2001 From: bjjwwang Date: Sat, 2 May 2026 20:08:28 +1000 Subject: [PATCH 2/2] Add explicit ManagedStatic.h include for llvm::llvm_shutdown() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LLVM 21 no longer pulls in transitively through the SVF / SVF-LLVM headers, so svf-example.cpp:186's call to llvm::llvm_shutdown() fails to compile: src/svf-example.cpp:186:9: error: 'llvm_shutdown' is not a member of 'llvm' The function is still part of LLVM 21's public ABI (still declared in llvm/Support/ManagedStatic.h, line 116) — just no longer transitively visible. Add the explicit include. Verified locally: - npm install svf-lib (v1.0.2555) + LLVM 21.1.0 prebuilt + Z3 - cmake -B build -S ./ && cmake --build build - The svf-example.cpp.o object compiles and links successfully. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/svf-example.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/svf-example.cpp b/src/svf-example.cpp index e54f694..aa815ad 100644 --- a/src/svf-example.cpp +++ b/src/svf-example.cpp @@ -31,6 +31,7 @@ #include "SVF-LLVM/SVFIRBuilder.h" #include "Util/Options.h" #include "WPA/Andersen.h" +#include "llvm/Support/ManagedStatic.h" using namespace llvm; using namespace std;