Skip to content

Added support for LLVM 20.1.0 and fix .editorconfig glob pattern for Vim #1685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

bsdb0y
Copy link

@bsdb0y bsdb0y commented Apr 5, 2025

No description provided.

Copy link

codecov bot commented Apr 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.59%. Comparing base (8161e7a) to head (4ef0d18).
Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1685   +/-   ##
=======================================
  Coverage   63.59%   63.59%           
=======================================
  Files         244      244           
  Lines       25736    25736           
  Branches     4508     4508           
=======================================
  Hits        16366    16366           
  Misses       9370     9370           
Files with missing lines Coverage Δ
svf-llvm/include/SVF-LLVM/BreakConstantExpr.h 33.33% <ø> (ø)
svf-llvm/include/SVF-LLVM/LLVMUtil.h 76.27% <ø> (ø)
svf-llvm/lib/LLVMModule.cpp 75.47% <ø> (ø)
svf-llvm/lib/LLVMUtil.cpp 73.80% <ø> (ø)
svf-llvm/lib/SVFIRBuilder.cpp 86.79% <ø> (ø)
svf-llvm/tools/Example/svf-ex.cpp 95.45% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yuleisui
Copy link
Collaborator

yuleisui commented Apr 5, 2025

Thanks for your contribution.

It would be good to support a more stable version of LLVM.20.1.0.

Could you also change the buid.sh for the CI to trigger the build of svf on top of new LLVM here?

SVF/build.sh

Line 26 in 1f7fcb8

MajorLLVMVer=16

@bsdb0y
Copy link
Author

bsdb0y commented Apr 5, 2025

done, in the build.sh I have added 20.1.0 as stable.

@yuleisui
Copy link
Collaborator

yuleisui commented Apr 5, 2025

done, in the build.sh I have added 20.1.0 as stable.

Looks like brew install llvm@20 is not available. It might need a few iterations to update the build.sh and github actions to fix these configuration errors.

@bsdb0y
Copy link
Author

bsdb0y commented Apr 5, 2025

done, in the build.sh I have added 20.1.0 as stable.

Looks like brew install llvm@20 is not available. It might need a few iterations to update the build.sh and github actions to fix these configuration errors.

Tested with LLVM 19.1.7 - compilation is working fine. Let me know if anything else is required on my end.
My Environment:

root@e857b7fe3f28:~/SVF# cat /etc/os-release
PRETTY_NAME="Ubuntu Plucky Puffin (development branch)"
NAME="Ubuntu"
VERSION_ID="25.04"
VERSION="25.04 (Plucky Puffin)"
VERSION_CODENAME=plucky
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=plucky
LOGO=ubuntu-logo

@bsdb0y bsdb0y changed the title Added support for LLVM 20.1.1 and fix .editorconfig glob pattern for Vim Added support for LLVM 20.1.0 and fix .editorconfig glob pattern for Vim Apr 5, 2025
@yuleisui
Copy link
Collaborator

yuleisui commented Apr 5, 2025

done, in the build.sh I have added 20.1.0 as stable.

Looks like brew install llvm@20 is not available. It might need a few iterations to update the build.sh and github actions to fix these configuration errors.

Tested with LLVM 19.1.7 - compilation is working fine. Let me know if anything else is required on my end. My Environment:

root@e857b7fe3f28:~/SVF# cat /etc/os-release
PRETTY_NAME="Ubuntu Plucky Puffin (development branch)"
NAME="Ubuntu"
VERSION_ID="25.04"
VERSION="25.04 (Plucky Puffin)"
VERSION_CODENAME=plucky
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=plucky
LOGO=ubuntu-logo

Could you then update the build.sh and github action?

@bsdb0y
Copy link
Author

bsdb0y commented Apr 5, 2025

done, in the build.sh I have added 20.1.0 as stable.

Looks like brew install llvm@20 is not available. It might need a few iterations to update the build.sh and github actions to fix these configuration errors.

On Mac OS - Sequoia 15.3.2:

$ brew list --versions llvm@20 && clang --version && llvm-config --version  && uname -a && sw_vers && xcodebuild -version
llvm 20.1.1
clang version 20.0.0git (https://github.com/llvm/llvm-project.git 2e30df740ef0b9f8edb7075768540ce08678023d)
Target: arm64-apple-darwin24.3.0
Thread model: posix
InstalledDir: /usr/local/bin
20.0.0git
Darwin test-2.local 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan  2 20:24:16 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6000 arm64
ProductName:            macOS
ProductVersion:         15.3.2
BuildVersion:           24D81
Xcode 16.2
Build version 16C5032a

@bsdb0y
Copy link
Author

bsdb0y commented Apr 5, 2025

done, in the build.sh I have added 20.1.0 as stable.

Looks like brew install llvm@20 is not available. It might need a few iterations to update the build.sh and github actions to fix these configuration errors.

Tested with LLVM 19.1.7 - compilation is working fine. Let me know if anything else is required on my end. My Environment:

root@e857b7fe3f28:~/SVF# cat /etc/os-release
PRETTY_NAME="Ubuntu Plucky Puffin (development branch)"
NAME="Ubuntu"
VERSION_ID="25.04"
VERSION="25.04 (Plucky Puffin)"
VERSION_CODENAME=plucky
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=plucky
LOGO=ubuntu-logo

Could you then update the build.sh and github action?

build.sh:

  • Added a fallback mechanism to install Clang+LLVM via apt if the curl download fails.
  • Introduced additional checks to validate the curl download process.

GitHub Actions:

  • The workflow is getting cancelled -- possibly due to it taking too long.
  • Is there a recommended way to test the workflow locally before pushing?

currently, trying act tool to replicate github actions workflow.
https://github.com/nektos/act

@bsdb0y
Copy link
Author

bsdb0y commented Apr 6, 2025

Currently, the tests are failing because the Test-Suite still has old .bc files that were built with LLVM 16. I ran the generate_bc.sh script with LLVM20 to rebuild everything, and that fixed about 98% of the test failures. There are still a few tests failing, and I’m working on fixing those. bsdb0y/Test-Suite@cbce00e

Could you help me figure out how to run generate_bc.sh in GitHub Actions? I tried adding it to the build-svf step after build.sh, but it didn’t work as expected.

@van-ema
Copy link

van-ema commented Apr 7, 2025

I get errors during linking of svf-llvm.
To fix we can force dynamic linking of passes component that includes the PassBuilder

I'm building with llvm 19.1.4

See bsdb0y@df92120

@bsdb0y
Copy link
Author

bsdb0y commented Apr 22, 2025

@yuleisui
before we can properly test the changes in this PR with GitHub Actions, I kindly request that we first review and merge the following Test-Suite PR: SVF-tools/Test-Suite#156.

It updates the test suite to be compatible with LLVM 20 and ensures all tests run correctly. Merging it first will help us get accurate test results here.

@yuleisui
Copy link
Collaborator

@yuleisui before we can properly test the changes in this PR with GitHub Actions, I kindly request that we first review and merge the following Test-Suite PR: SVF-tools/Test-Suite#156.

It updates the test suite to be compatible with LLVM 20 and ensures all tests run correctly. Merging it first will help us get accurate test results here.

Could you clean up your pull request in test-suite? There are lots of svf.svf.bc files and pre.bc files committed. Please make sure the commit is clean with mimum changes.

@bsdb0y
Copy link
Author

bsdb0y commented Apr 23, 2025

@yuleisui before we can properly test the changes in this PR with GitHub Actions, I kindly request that we first review and merge the following Test-Suite PR: SVF-tools/Test-Suite#156.
It updates the test suite to be compatible with LLVM 20 and ensures all tests run correctly. Merging it first will help us get accurate test results here.

Could you clean up your pull request in test-suite? There are lots of svf.svf.bc files and pre.bc files committed. Please make sure the commit is clean with mimum changes.

Thank you for pointing that out! I had pushed the precompiled .bc files as we are using them, but I mistakenly forgot to clean up the .pre. and *.svf.bc files. I've already made the suggested changes and cleaned up the pull request to ensure it includes only the relevant files. Please let me know if there’s anything else I can do or adjust to make it merge.

@bsdb0y
Copy link
Author

bsdb0y commented Apr 24, 2025

I get errors during linking of svf-llvm. To fix we can force dynamic linking of passes component that includes the PassBuilder

I'm building with llvm 19.1.4

See bsdb0y@df92120

thank you so much @van-ema for testing it on macOS. I have added a check for OS detection to CMakeLists.txt, so it is like: if macOS, then add passes to link bsdb0y@cb7bb31

@bsdb0y
Copy link
Author

bsdb0y commented May 4, 2025

@yuleisui could you please approve the latest commit so we can confirm whether it's failing or success? It’s working perfectly on my end, I tested it locally on both Ubuntu and macOS, even using the act tool to simulate GitHub Actions. I’m happy to integrate this work if everything works out. Let me know if you need anything from my side!

@bsdb0y
Copy link
Author

bsdb0y commented May 4, 2025

@yuleisui could you please approve the latest commit so we can confirm whether it's failing or success? It’s working perfectly on my end, I tested it locally on both Ubuntu and macOS, even using the act tool to simulate GitHub Actions. I’m happy to integrate this work if everything works out. Let me know if you need anything from my side!

@yuleisui I can see from the GitHub Actions that the code is compiling successfully on both environments, but the tests are failing. That’s because this PR (SVF-tools/Test-Suite#156) still needs to be reviewed, approved, and merged. Once that happens, it should fetch the latest test cases that are compatible with LLVM 20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants