Skip to content

build(tools): allow LLVM from the system - #15805

Open
oberonlift wants to merge 1 commit into
boykopovar:mainfrom
oberonlift:conventions-llvm
Open

oberonlift wants to merge 1 commit into
boykopovar:mainfrom
oberonlift:conventions-llvm

Conversation

@oberonlift

@oberonlift oberonlift commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Can merge at any time, as long as it is before #15806.

ps5lift is a static recompiler for PS5 executables: it lifts a game's x86-64 code to LLVM IR and compiles it ahead of time to aarch64, which runs on Linux against AnyPS5's own libraries with no interpreter or JIT. It runs AnyPS5's PS5-style test programs and a homebrew media player to its home screen; commercial games are not playable yet. Branch ps5lift-preview merges all of its PRs (how to try it); native Apple Silicon support is coming along fast. It is a separate approach from the ARM64 compiler in #5021; #1835 has an introduction.

ps5lift's lifter builds against LLVM from the system, and the convention check reports find_package(LLVM) as third-party code that is not a submodule. This lets the lifter's PR, which follows, pass the check.

What

The convention check accepts find_package(LLVM) as it accepts Python3, Threads and Git.

Tested

tools/tests/test_check_conventions_comments.py passes, with a new case for find_package(LLVM REQUIRED CONFIG). The convention check passes on this PR, and on the lifter's branch when it runs this PR's script.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 63da9ee merged onto main b11c7bf · tested 2026-11-04 17:00 UTC · 24 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 991 passed · 1 failed (0 new, 1 also fail on main) · 48 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 1,040 of 3,894 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (524 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ public_headers 90.2 s, ⚠️ agc_driver_image_sample_unnormalized 64.8 s, ⚠️ agc_driver_lazy_resolved_abi 49.4 s, ⚠️ agc_driver_image_gather_volume 33.6 s, ⚠️ agc_driver_indirect_thread_dimensions 32.3 s
Failing on main too (1, not counted against this PR)
agc_driver_image_table
Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
public_headers: Timeout in the parallel run; also passed only on retry in 16 other runs in the last 7 days
Validated but not compared (46, not in the main baseline's validation pass)
guest_kernel_sys
public_headers
public_headers_compile_20
public_headers_compile_21
public_headers_compile_22
public_headers_compile_23
public_headers_compile_24
public_headers_compile_25
public_headers_compile_26
public_headers_compile_27
public_headers_compile_28
public_headers_compile_29
public_headers_compile_30
public_headers_compile_31
public_headers_compile_32
public_headers_compile_33
public_headers_compile_34
public_headers_compile_35
public_headers_compile_36
public_headers_compile_37
public_headers_compile_38
public_headers_compile_39
public_headers_compile_40
public_headers_compile_41
public_headers_compile_42
public_headers_compile_43
public_headers_compile_44
public_headers_compile_45
public_headers_compile_46
public_headers_compile_47
public_headers_compile_48
public_headers_compile_49
public_headers_compile_50
public_headers_compile_51
public_headers_compile_52
public_headers_compile_53
public_headers_compile_54
public_headers_compile_55
public_headers_compile_56
public_headers_compile_57
public_headers_compile_58
public_headers_compile_59
public_headers_compile_60
public_headers_compile_61
public_headers_compile_62
public_headers_compile_63
Validation IDs already present on main (8 IDs in 402 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (402 tests): agc_driver_address_draw_space_reuse, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 394 more
VUID-vkCmdCopyImage-srcImage-01548 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (48)
usage: check_skips.py [-h] [--job {linux,windows}] [--list] [--require-tests]
                      junit
check_skips.py: error: /home/ben/anyps5-gpu-ci/data/runs/pr-15805/63da9eeb5232-b11c7bf84f5d/ctest.xml: testcase 'public_headers_compile_20' is notrun and was not run
Reproduce
git fetch origin 63da9eeb5232188809b3850f0f3fa549eea8c24f b11c7bf84f5d2f636ff60166cc3371bd071e24d5
git checkout b11c7bf84f5d2f636ff60166cc3371bd071e24d5 && git merge --no-ff 63da9eeb5232188809b3850f0f3fa549eea8c24f
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@DonRyuzaki

Copy link
Copy Markdown
Contributor

Independent Windows check of current head f385a255c4bc, locally merged onto main e772fb25cc72e as a1eba38ba0e2 (clean merge). With CPython 3.12.10, all 82 tools.tests.test_check_conventions_comments tests passed; check_conventions.py --base origin/main and whitespace checks passed.

I also compared the checker pattern against unmodified current main for seven cases. The PR newly allows both find_package(LLVM REQUIRED CONFIG) and mixed-case FIND_PACKAGE( llvm 19 CONFIG REQUIRED ). It still rejects the near-name LLVMExtra, pkg_check_modules(LLVM), find_library(LLVM), and unrelated find_package(ZLIB); the pre-existing Python3 exemption remains. This checks that the exception stays limited to the find_package(LLVM) package name and does not relax other system-dependency paths.

Focused checker validation only; I did not build ps5lift or exercise LLVM itself. AI-assisted: yes.

@oberonlift
oberonlift force-pushed the conventions-llvm branch 5 times, most recently from e1cc375 to 35ff806 Compare November 6, 2026 17:39
The convention check accepts find_package(LLVM) as it accepts Python3,
Threads and Git.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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