Repository navigation
chore: upgrade LLVM to 22.1.4 #448
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
Closed
Closed
Changes from 33 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
ac09151
chore: use umbrella targets for LLVM distribution components
16bit-ykiko 9475574
fix: reduce LLVM_TARGETS_TO_BUILD to X86;AArch64;ARM;RISCV
16bit-ykiko 28e959b
fix: free disk space on macOS runners before LLVM build
16bit-ykiko 23f06bd
ci: add temporary workflow to test macOS disk cleanup
16bit-ykiko 7d866c5
ci(temp): test macOS disk cleanup only
16bit-ykiko b8a7728
ci: restore full build matrix and remove test workflow
16bit-ykiko dfdd568
chore: adapt codebase to LLVM 22.1.4 API changes
16bit-ykiko d62c97f
ci: add prune-llvm workflow for discovering unused LLVM libraries
16bit-ykiko 34d14b7
fix(prune): record file sizes during discover and fix skip-pattern
16bit-ykiko 7a11590
refactor(cmake): switch to find_package(LLVM/Clang) for dependency re…
16bit-ykiko 1c15285
fix(prune): nullify shared libs and force relink during discovery
16bit-ykiko ada86a6
fix(prune): replace pruned libs with empty archives and track shared …
16bit-ykiko 5192582
ci: add release-llvm workflow and rewrite cmake download
16bit-ykiko 3045ecd
ci: add push trigger for release-llvm on feature branch
16bit-ykiko 7db6205
refactor: rename prune script to release-llvm and add parallel repackage
16bit-ykiko b3336a6
ci: split repackage into parallel matrix jobs with direct release upload
16bit-ykiko e2aa166
fix(release): use xz -6 compression to keep assets under 2GB limit
16bit-ykiko 0b5ca40
fix(release): use xz -6 compression to keep assets under 2GB limit
16bit-ykiko f914f01
fix(release): retry with xz -9 when artifact exceeds 2GB limit
16bit-ykiko 4d5d495
refactor(release): use xz -9 compression and key-based manifest format
16bit-ykiko baef44d
refactor(release): use xz -9e extreme compression for maximum ratio
16bit-ykiko 134ae3f
chore: update llvm-manifest.json to 22.1.4
16bit-ykiko 703abf3
chore: remove unused setup-llvm.py
16bit-ykiko c2e63ed
fix: address review findings for LLVM 22 upgrade
16bit-ykiko a82b737
fix: address second round of review findings
16bit-ykiko 24b1027
chore: strip build-llvm.yml to LLVM-only build
16bit-ykiko ce81958
fix: add clangOptions to link deps and apply formatting
16bit-ykiko 7a2c122
chore: remove dead upload-llvm workflow and scripts
16bit-ykiko f795e23
fix: complete LLVM 22 API adaptation after rebase
16bit-ykiko e189369
fix: update llvm-manifest.json with correct LLVM 22.1.4 hashes
16bit-ykiko a1cad55
fix: remove heuristic resolver call on dependent TSTs in find_target
16bit-ykiko c56f358
fix: preserve project VFS when no remapped files are configured
16bit-ykiko 5e181aa
test(usr): verify InjectedClassNameType USR consistency
16bit-ykiko 8c0ccc9
fix(hover): avoid double struct/class prefix in type display
16bit-ykiko 28532fc
docs: add LLVM 21→22 API changelog with commit references
16bit-ykiko a3e4f27
docs: reorganize LLVM upgrade workflow and changelog
16bit-ykiko 3222201
docs: consolidate LLVM changelog and make upgrade workflow a skill
16bit-ykiko 3ce678e
docs: remove merge step from upgrade-llvm skill
16bit-ykiko 055dcbc
docs: add user confirmation step to upgrade-llvm workflow
16bit-ykiko 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
There are no files selected for viewing
Large diffs are not rendered by default.
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,227 @@ | ||
| name: release llvm | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| source_run_id: | ||
| description: "Run ID from build-llvm containing LLVM artifacts" | ||
| required: true | ||
| type: string | ||
| llvm_version: | ||
| description: "LLVM version (e.g. 22.1.4)" | ||
| required: true | ||
| type: string | ||
|
|
||
| env: | ||
| SOURCE_RUN_ID: ${{ inputs.source_run_id }} | ||
| LLVM_VERSION: ${{ inputs.llvm_version }} | ||
|
|
||
| jobs: | ||
| discover: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - os: ubuntu-24.04 | ||
| artifact: x64-linux-gnu-releasedbg.tar.xz | ||
| - os: macos-15 | ||
| artifact: arm64-macos-clang-releasedbg.tar.xz | ||
| - os: windows-2025 | ||
| artifact: x64-windows-msvc-releasedbg.tar.xz | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: ./.github/actions/setup-pixi | ||
| with: | ||
| environments: package | ||
|
|
||
| - name: Free Disk Space (macOS) | ||
| if: runner.os == 'macOS' | ||
| run: | | ||
| if [ -d "/Library/Developer/CoreSimulator" ]; then | ||
| sudo rm -rf /Library/Developer/CoreSimulator | ||
| fi | ||
| XCODE_PATH="$(xcode-select -p)" | ||
| PLATFORMS_DIR="${XCODE_PATH}/Platforms" | ||
| for p in iPhoneOS.platform iPhoneSimulator.platform AppleTVOS.platform AppleTVSimulator.platform WatchOS.platform WatchSimulator.platform XROS.platform XRSimulator.platform; do | ||
| [ -d "${PLATFORMS_DIR}/${p}" ] && sudo rm -rf "${PLATFORMS_DIR}/${p}" | ||
| done | ||
| sudo rm -rf ~/Library/Android /usr/local/share/dotnet /usr/local/share/powershell ~/.ghcup | ||
|
|
||
| - name: Download LLVM artifact | ||
| shell: bash | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| gh run download "${{ env.SOURCE_RUN_ID }}" \ | ||
| -n "${{ matrix.artifact }}" -D .llvm-download | ||
| mkdir -p .llvm | ||
| tar -xf ".llvm-download/${{ matrix.artifact }}" -C .llvm | ||
| rm -rf .llvm-download | ||
|
|
||
| - name: Build clice | ||
| shell: bash | ||
| run: | | ||
| pixi run cmake-config RelWithDebInfo ON -- \ | ||
| "-DLLVM_INSTALL_PATH=.llvm/build-install" | ||
| pixi run cmake-build RelWithDebInfo | ||
|
|
||
| - name: Discover unused libraries | ||
| shell: bash | ||
| run: | | ||
| python3 scripts/release-llvm.py discover \ | ||
| --install-dir .llvm/build-install/lib \ | ||
| --build-dir build/RelWithDebInfo \ | ||
| --manifest pruned-libs.json \ | ||
| --skip-pattern "*Tidy*Module*" | ||
|
|
||
| - name: Print prune results | ||
| shell: bash | ||
| run: | | ||
| python3 -c " | ||
| import json | ||
| data = json.load(open('pruned-libs.json')) | ||
| removed = data['removed'] | ||
| total = data.get('total_saved_bytes', 0) | ||
| print(f'Libraries prunable: {len(removed)}') | ||
| print(f'Space saved: {total / 1048576:.1f} MB') | ||
| for entry in sorted(removed, key=lambda e: e['size'], reverse=True)[:20]: | ||
| print(f' {entry[\"size\"] / 1048576:>7.1f} MB {entry[\"name\"]}') | ||
| " | ||
|
|
||
| - name: Upload manifest | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: prune-manifest-${{ matrix.os }} | ||
| path: pruned-libs.json | ||
|
|
||
| create-release: | ||
| needs: discover | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Create or reuse release | ||
| env: | ||
| GH_TOKEN: ${{ secrets.UPLOAD_LLVM }} | ||
| run: | | ||
| TAG="${{ env.LLVM_VERSION }}" | ||
| REPO="clice-io/clice-llvm" | ||
| if gh release view "$TAG" --repo "$REPO" &>/dev/null; then | ||
| echo "Release $TAG already exists, will overwrite assets" | ||
| else | ||
| gh release create "$TAG" \ | ||
| --repo "$REPO" \ | ||
| --title "$TAG" \ | ||
| --notes "LLVM ${TAG} — build run https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
| fi | ||
|
|
||
| repackage: | ||
| needs: [discover, create-release] | ||
| runs-on: ubuntu-24.04 | ||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| artifact: | ||
| - aarch64-linux-gnu-releasedbg-lto.tar.xz | ||
| - aarch64-linux-gnu-releasedbg.tar.xz | ||
| - aarch64-windows-msvc-releasedbg-lto.tar.xz | ||
| - aarch64-windows-msvc-releasedbg.tar.xz | ||
| - arm64-macos-clang-debug-asan.tar.xz | ||
| - arm64-macos-clang-releasedbg-lto.tar.xz | ||
| - arm64-macos-clang-releasedbg.tar.xz | ||
| - x64-linux-gnu-debug-asan.tar.xz | ||
| - x64-linux-gnu-releasedbg-lto.tar.xz | ||
| - x64-linux-gnu-releasedbg.tar.xz | ||
| - x64-macos-clang-releasedbg-lto.tar.xz | ||
| - x64-macos-clang-releasedbg.tar.xz | ||
| - x64-windows-msvc-releasedbg-lto.tar.xz | ||
| - x64-windows-msvc-releasedbg.tar.xz | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Free disk space | ||
| run: | | ||
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \ | ||
| /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup | ||
|
|
||
| - name: Download prune manifests | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| pattern: prune-manifest-* | ||
| path: manifests | ||
|
|
||
| - name: Repackage | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| python3 scripts/release-llvm.py repackage \ | ||
| --source-run-id "${{ env.SOURCE_RUN_ID }}" \ | ||
| --manifests-dir manifests \ | ||
| --output-dir artifacts \ | ||
| --max-parallel 1 \ | ||
| --version "${{ env.LLVM_VERSION }}" \ | ||
| --artifacts "${{ matrix.artifact }}" | ||
|
|
||
| - name: Upload to release | ||
| env: | ||
| GH_TOKEN: ${{ secrets.UPLOAD_LLVM }} | ||
| run: | | ||
| gh release upload "${{ env.LLVM_VERSION }}" \ | ||
| "artifacts/${{ matrix.artifact }}" \ | ||
| --repo clice-io/clice-llvm \ | ||
| --clobber | ||
|
|
||
| - name: Upload metadata | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: metadata-${{ matrix.artifact }} | ||
| path: artifacts/${{ matrix.artifact }}.meta.json | ||
| compression-level: 0 | ||
| retention-days: 1 | ||
|
|
||
| finalize: | ||
| needs: repackage | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Download all metadata | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| pattern: metadata-* | ||
| path: metadata | ||
| merge-multiple: true | ||
|
|
||
| - name: Build manifest | ||
| run: | | ||
| python3 -c " | ||
| import json, pathlib | ||
| entries = [json.loads(p.read_text()) for p in sorted(pathlib.Path('metadata').glob('*.meta.json'))] | ||
| manifest = {'version': entries[0]['version'], 'artifacts': {}} | ||
| for entry in entries: | ||
| filename = entry.pop('filename') | ||
| entry.pop('version', None) | ||
| manifest['artifacts'][filename] = entry | ||
| with open('llvm-manifest.json', 'w') as f: | ||
| json.dump(manifest, f, indent=2) | ||
| f.write('\n') | ||
| print(f'Manifest: {len(manifest[\"artifacts\"])} artifacts') | ||
| " | ||
|
|
||
| - name: Upload manifest to release | ||
| env: | ||
| GH_TOKEN: ${{ secrets.UPLOAD_LLVM }} | ||
| run: | | ||
| gh release upload "${{ env.LLVM_VERSION }}" \ | ||
| llvm-manifest.json \ | ||
| --repo clice-io/clice-llvm \ | ||
| --clobber | ||
|
|
||
| - name: Save manifest artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: llvm-manifest-final | ||
| path: llvm-manifest.json | ||
| if-no-files-found: error | ||
| compression-level: 0 | ||
This file was deleted.
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.
Uh oh!
There was an error while loading. Please reload this page.