From 790e593bf140bb864dea33c169ca78bc9d83e56d Mon Sep 17 00:00:00 2001 From: Wenju He Date: Tue, 9 Sep 2025 05:36:36 +0200 Subject: [PATCH] [libclc] Don't add --override if there is no bitcode of generic implementation If there is no bitcode of generic implementation, all target bitcode files are added --override flag and there is build error: `llvm-link: Not enough positional command line arguments specified!` --- libclc/cmake/modules/AddLibclc.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libclc/cmake/modules/AddLibclc.cmake b/libclc/cmake/modules/AddLibclc.cmake index aa8dd9859cd22..eb8c03d4f2107 100644 --- a/libclc/cmake/modules/AddLibclc.cmake +++ b/libclc/cmake/modules/AddLibclc.cmake @@ -92,7 +92,8 @@ function(link_bc) ${ARGN} ) - if( ARG_INTERNALIZE ) + string( FIND "${ARG_INPUTS}" "/generic/" has_generic ) + if( ARG_INTERNALIZE OR has_generic LESS 0 ) set( inputs_with_flag ${ARG_INPUTS} ) else() # Add the --override flag for non-generic bitcode files so that their