https://github.com/wenju-he updated https://github.com/llvm/llvm-project/pull/191743
>From 37cd0e751e31c7c8fa3dd1ae5e9792923835806a Mon Sep 17 00:00:00 2001 From: Wenju He <[email protected]> Date: Mon, 13 Apr 2026 01:41:36 +0200 Subject: [PATCH 1/2] [runtimes] Aggregate per-target runtime checks in top-level check-${runtime_name} When a per-target runtime build exports a check-${runtime_name}-${target} proxy, make the top-level check-${runtime_name} target depend on it, creating check-${runtime_name} on demand if needed. This applies regardless of whether the runtime comes from the default LLVM_ENABLE_RUNTIMES set or from a target-specific RUNTIMES_<target>_LLVM_ENABLE_RUNTIMES override. This allows a single `check-${runtime_name}` command to trigger all per-target tests for that runtime. --- .ci/compute_projects.py | 2 +- .ci/compute_projects_test.py | 10 +++++----- .ci/monolithic-linux.sh | 2 +- .ci/monolithic-windows.sh | 2 +- llvm/runtimes/CMakeLists.txt | 9 +++++++++ 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py index e4532adc12787..178ebc6ec5f97 100644 --- a/.ci/compute_projects.py +++ b/.ci/compute_projects.py @@ -153,7 +153,7 @@ "flang": "check-flang", "flang-rt": "check-flang-rt", "libc": "check-libc", - "libclc": "check-libclc-amdgcn-amd-amdhsa-llvm", + "libclc": "check-libclc", "lld": "check-lld", "lldb": "check-lldb", "mlir": "check-mlir", diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py index b8504a57b6dca..63fed4957cf4e 100644 --- a/.ci/compute_projects_test.py +++ b/.ci/compute_projects_test.py @@ -268,7 +268,7 @@ def test_include_libclc_in_runtimes(self): self.assertEqual(env_variables["runtimes_to_build"], "") self.assertEqual( env_variables["runtimes_check_targets"], - "check-libclc-amdgcn-amd-amdhsa-llvm", + "check-libclc", ) self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "") @@ -310,7 +310,7 @@ def test_ci(self): ) self.assertEqual( env_variables["runtimes_check_targets"], - "check-compiler-rt check-flang-rt check-libc check-libclc-amdgcn-amd-amdhsa-llvm", + "check-compiler-rt check-flang-rt check-libc check-libclc", ) self.assertEqual( env_variables["runtimes_check_targets_needs_reconfig"], @@ -335,7 +335,7 @@ def test_windows_ci(self): ) self.assertEqual( env_variables["runtimes_check_targets"], - "check-compiler-rt check-libclc-amdgcn-amd-amdhsa-llvm", + "check-compiler-rt check-libclc", ) self.assertEqual( env_variables["runtimes_check_targets_needs_reconfig"], @@ -384,7 +384,7 @@ def test_premerge_workflow(self): ) self.assertEqual( env_variables["runtimes_check_targets"], - "check-compiler-rt check-flang-rt check-libc check-libclc-amdgcn-amd-amdhsa-llvm", + "check-compiler-rt check-flang-rt check-libc check-libclc", ) self.assertEqual( env_variables["runtimes_check_targets_needs_reconfig"], @@ -419,7 +419,7 @@ def test_third_party_benchmark(self): ) self.assertEqual( env_variables["runtimes_check_targets"], - "check-compiler-rt check-flang-rt check-libc check-libclc-amdgcn-amd-amdhsa-llvm", + "check-compiler-rt check-flang-rt check-libc check-libclc", ) self.assertEqual( env_variables["runtimes_check_targets_needs_reconfig"], diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index 9d9c3de905b99..29b0bdbd0e37b 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -32,7 +32,7 @@ enable_cir="${6}" lit_args="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests --succinct" runtime_cmake_args=() -if [[ " ${runtime_targets} " == *" check-libclc-amdgcn-amd-amdhsa-llvm "* ]]; then +if [[ " ${runtime_targets} " == *" check-libclc "* ]]; then runtime_cmake_args+=( -D RUNTIMES_amdgcn-amd-amdhsa-llvm_LLVM_ENABLE_RUNTIMES=libclc -D LLVM_RUNTIME_TARGETS="default;amdgcn-amd-amdhsa-llvm" diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh index 795893c305665..67cbebb1beb5c 100755 --- a/.ci/monolithic-windows.sh +++ b/.ci/monolithic-windows.sh @@ -21,7 +21,7 @@ runtimes="${3}" runtimes_targets="${4}" runtime_cmake_args=() -if [[ " ${runtimes_targets} " == *" check-libclc-amdgcn-amd-amdhsa-llvm "* ]]; then +if [[ " ${runtimes_targets} " == *" check-libclc "* ]]; then runtime_cmake_args+=( -D RUNTIMES_amdgcn-amd-amdhsa-llvm_LLVM_ENABLE_RUNTIMES=libclc -D LLVM_RUNTIME_TARGETS="default;amdgcn-amd-amdhsa-llvm" diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index dfa8369bad7b4..c44795536af57 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -462,6 +462,15 @@ function(runtime_register_target name) if(TARGET builtins-${name}) add_dependencies(check-builtins check-builtins-${name}) endif() + + foreach(runtime_name ${runtime_names}) + if(TARGET check-${runtime_name}-${name}) + if(NOT TARGET check-${runtime_name}) + add_custom_target(check-${runtime_name}) + endif() + add_dependencies(check-${runtime_name} check-${runtime_name}-${name}) + endif() + endforeach() endif() foreach(runtime_name ${runtime_names}) if(NOT TARGET ${runtime_name}) >From 1df89b58e5a9d2f8663005d5c11f72339a0d6fa8 Mon Sep 17 00:00:00 2001 From: Wenju He <[email protected]> Date: Wed, 15 Apr 2026 01:55:00 +0200 Subject: [PATCH 2/2] update README about check-libclc --- libclc/README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/libclc/README.md b/libclc/README.md index f50a931a67f6c..81ce1553d139c 100644 --- a/libclc/README.md +++ b/libclc/README.md @@ -85,11 +85,22 @@ Note you can use the `DESTDIR` Makefile variable to do staged installs. DESTDIR=/path/for/staged/install ninja install ``` -## Run tests +## Testing +libclc utilizes the LLVM testing infrastructure. +#### Run all tests +To execute all per-target tests for libclc. +``` +ninja check-libclc +``` +`check-libclc` is a top-level target that aggregates all per-target tests. + +#### Run target-specific tests +If you are working on a specific target, you can run tests for just that target triple: ``` ninja check-libclc-<target-triple> ``` -or +Alternatively, you can run target-specific tests via the runtimes build by +pointing to the target-specific build directory: ``` ninja -C runtimes/runtimes-<target-triple>-bins check-libclc ``` _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
