From f567c03221769d0e5e267a3c239079756aadea80 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Tue, 18 Feb 2025 09:14:04 +0000 Subject: [PATCH] [libclc] Disable external-calls testing for clspv targets (#127529) These targets don't include all OpenCL builtins, so there will always be external calls in the final bytecode module. Fixes #127316. (cherry picked from commit 9fec0a0942f5a11f4dcfec20aa485a8513661720) --- libclc/cmake/modules/AddLibclc.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libclc/cmake/modules/AddLibclc.cmake b/libclc/cmake/modules/AddLibclc.cmake index b520626c6ffd1..717121abb8c98 100644 --- a/libclc/cmake/modules/AddLibclc.cmake +++ b/libclc/cmake/modules/AddLibclc.cmake @@ -345,8 +345,9 @@ function(add_libclc_builtin_set) add_custom_target( prepare-${obj_suffix} ALL DEPENDS ${obj_suffix} ) set_target_properties( "prepare-${obj_suffix}" PROPERTIES FOLDER "libclc/Device IR/Prepare" ) - # nvptx-- targets don't include workitem builtins - if( NOT ARG_TRIPLE MATCHES ".*ptx.*--$" ) + # nvptx-- targets don't include workitem builtins, and clspv targets don't + # include all OpenCL builtins + if( NOT ARG_ARCH MATCHES "^(nvptx|clspv)(64)?$" ) add_test( NAME external-calls-${obj_suffix} COMMAND ./check_external_calls.sh ${CMAKE_CURRENT_BINARY_DIR}/${obj_suffix} ${LLVM_TOOLS_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )