-
Notifications
You must be signed in to change notification settings - Fork 42
Replace cxx-common with superbuild, add LLVM 20 support #343
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
Draft
artemdinaburg
wants to merge
46
commits into
master
Choose a base branch
from
llvm-build-updates
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 23 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
68aec8b
Add superbuild infrastructure
artemdinaburg 40f0837
Add LLVM 16-20 compatibility layer
artemdinaburg 31c80f7
Apply LLVM compatibility to AST builders
artemdinaburg 5dae177
Apply LLVM compatibility to tools
artemdinaburg 2a1ed92
Apply LLVM compatibility to unit tests
artemdinaburg f4e26dd
Update main CMakeLists.txt for superbuild
artemdinaburg b5c339b
Replace CI with multi-version build matrix
artemdinaburg 1901e97
Simplify Dockerfile for multi-version support
artemdinaburg cae38d0
Update documentation for new build system
artemdinaburg 897851a
Remove legacy build infrastructure
artemdinaburg 081d83b
Update default LLVM version to 20.1.5
artemdinaburg 7aac3c1
Simplify build instructions with Quick Start section
artemdinaburg 1ef738c
Fix doctest CMake compatibility
artemdinaburg 285afef
Fix Z3 build: update from 4.13.0 to 4.13.4
artemdinaburg dc3eb1a
Fix LLVM 20.1.5 SHA256 hash
artemdinaburg ee61994
Fix gflags target namespace for glog compatibility
artemdinaburg a0d388e
Add LLVM 20 compatibility for mangleTypeName and PointerUnion
artemdinaburg d815025
Use LLVM 20 code from llvm20 branch
artemdinaburg e8595d2
Update CI to test LLVM 20 only
artemdinaburg df8cee8
Fix LLVM/Clang include dirs to be PRIVATE
artemdinaburg d522a2c
Add missing Binary case in StringLiteral switch
artemdinaburg 556c46d
Update documentation for LLVM 20 only
artemdinaburg 20919cd
Document external LLVM requirements
artemdinaburg 2d360c6
Fix SIGSEGV in PackedAttr creation for LLVM 20
artemdinaburg a52797c
Reduce bigstruct test size to avoid LLVM 20 crash
artemdinaburg 6b365e9
Skip known failing tests with documented reasons
artemdinaburg 2ba30a7
Add zlib and zstd dependencies to CI
artemdinaburg 2f617c1
Fix macOS CI to use Homebrew LLVM clang
artemdinaburg d3c02dc
Make LLVM/Clang include dirs PUBLIC for tools
artemdinaburg d8a1169
Use SYSTEM includes for LLVM/Clang headers
artemdinaburg d7acca0
Fix macOS build with Homebrew LLVM
artemdinaburg a2b83e0
Use PUBLIC includes for LLVM/Clang headers on all platforms
artemdinaburg 5c43bd9
Fix macOS build by clearing CMAKE_OSX_SYSROOT
artemdinaburg ae89bd4
Unset SDKROOT on macOS to fix Homebrew LLVM build
artemdinaburg 079fe2d
Use -nostdinc++ with explicit libc++ path on macOS
artemdinaburg 91f765d
Use system AppleClang on macOS to avoid libc++ conflicts
artemdinaburg ada8f72
Remove empty CMAKE_OSX_SYSROOT from macOS workflow
artemdinaburg 742f529
Fix test sysroot check to require non-empty value
artemdinaburg 17714c1
macOS: Use Homebrew clang with explicit libc++ paths
artemdinaburg 3a095b3
macOS: Use -I instead of -isystem for libc++ include path priority
artemdinaburg 2804b0c
Mark macOS CI as experimental (continue-on-error)
artemdinaburg 0ebb9e7
Fix CMake include paths and update macOS documentation
artemdinaburg 7fa3b3e
Fix PassManager setup to properly register analyses
artemdinaburg 39ae681
Document Homebrew LLVM shared library limitation
artemdinaburg 7d13b06
Add RELLIC_FORCE_STATIC_LLVM option for Homebrew LLVM
artemdinaburg 63c6c0f
Enable RELLIC_FORCE_STATIC_LLVM in macOS CI
artemdinaburg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| name: Build and Test | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master, main] | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| linux: | ||
| name: Linux (LLVM ${{ matrix.llvm }}) | ||
| runs-on: ubuntu-22.04 | ||
| container: | ||
| image: ubuntu:22.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| llvm: ["20"] | ||
|
|
||
| steps: | ||
| - name: Install system dependencies | ||
| run: | | ||
| apt-get update | ||
| apt-get install -y --no-install-recommends \ | ||
| wget ca-certificates gnupg lsb-release software-properties-common \ | ||
| git cmake ninja-build python3 python-is-python3 | ||
|
|
||
| - name: Install LLVM ${{ matrix.llvm }} | ||
| run: | | ||
| wget https://apt.llvm.org/llvm.sh | ||
| chmod +x llvm.sh | ||
| ./llvm.sh ${{ matrix.llvm }} | ||
| apt-get install -y --no-install-recommends \ | ||
| llvm-${{ matrix.llvm }}-dev \ | ||
| clang-${{ matrix.llvm }} \ | ||
| libclang-${{ matrix.llvm }}-dev | ||
|
|
||
| echo "CC=clang-${{ matrix.llvm }}" >> $GITHUB_ENV | ||
| echo "CXX=clang++-${{ matrix.llvm }}" >> $GITHUB_ENV | ||
| echo "LLVM_DIR=$(llvm-config-${{ matrix.llvm }} --cmakedir)" >> $GITHUB_ENV | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Mark workspace safe | ||
| run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
|
|
||
| - name: Build dependencies | ||
| run: | | ||
| cmake -G Ninja -S dependencies -B dependencies/build \ | ||
| -DUSE_EXTERNAL_LLVM=ON \ | ||
| -DCMAKE_PREFIX_PATH="$LLVM_DIR/.." | ||
| cmake --build dependencies/build | ||
|
|
||
| - name: Build rellic | ||
| run: | | ||
| cmake -G Ninja -B build \ | ||
| -DCMAKE_PREFIX_PATH="$LLVM_DIR/..;$PWD/dependencies/install" \ | ||
| -DCMAKE_INSTALL_PREFIX="$PWD/install" \ | ||
| -DCMAKE_BUILD_TYPE=Release | ||
| cmake --build build | ||
|
|
||
| - name: Install rellic | ||
| run: cmake --install build | ||
|
|
||
| - name: Test rellic | ||
| run: | | ||
| ./install/bin/rellic-decomp-${{ matrix.llvm }} --version || true | ||
| env CTEST_OUTPUT_ON_FAILURE=1 ctest --test-dir build | ||
|
|
||
| - name: Upload artifacts | ||
| if: matrix.llvm == '20' | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: rellic-linux-llvm${{ matrix.llvm }} | ||
| path: install/ | ||
|
|
||
| macos: | ||
| name: macOS (LLVM ${{ matrix.llvm }}) | ||
| runs-on: macos-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| llvm: ["20"] | ||
|
|
||
| steps: | ||
| - name: Install LLVM | ||
| run: | | ||
| brew install llvm@${{ matrix.llvm }} ninja | ||
| echo "CC=clang" >> $GITHUB_ENV | ||
| echo "CXX=clang++" >> $GITHUB_ENV | ||
| echo "LLVM_DIR=$(brew --prefix llvm@${{ matrix.llvm }})/lib/cmake/llvm" >> $GITHUB_ENV | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Build dependencies | ||
| run: | | ||
| cmake -G Ninja -S dependencies -B dependencies/build \ | ||
| -DUSE_EXTERNAL_LLVM=ON \ | ||
| -DCMAKE_PREFIX_PATH="$LLVM_DIR/.." | ||
| cmake --build dependencies/build | ||
|
|
||
| - name: Build rellic | ||
| run: | | ||
| cmake -G Ninja -B build \ | ||
| -DCMAKE_PREFIX_PATH="$LLVM_DIR/..;$PWD/dependencies/install" \ | ||
| -DCMAKE_INSTALL_PREFIX="$PWD/install" \ | ||
| -DCMAKE_BUILD_TYPE=Release | ||
| cmake --build build | ||
|
|
||
| - name: Install rellic | ||
| run: cmake --install build | ||
|
|
||
| - name: Test rellic | ||
| run: | | ||
| ./install/bin/rellic-decomp-${{ matrix.llvm }} --version || true | ||
| env CTEST_OUTPUT_ON_FAILURE=1 ctest --test-dir build | ||
|
Comment on lines
83
to
127
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium