[libclc] [libclc] Fix commands in compile_to_bc are executed sequentially (PR #130755)

Fraser Cormack via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 26 06:16:46 PDT 2025


================
@@ -256,19 +261,25 @@ function(add_libclc_builtin_set)
 
     get_filename_component( file_dir ${file} DIRECTORY )
 
+    string( REPLACE "/" "-" replaced ${file} )
+    set( tgt compile_tgt-${ARG_ARCH_SUFFIX}${replaced})
+
     compile_to_bc(
+      TARGET ${tgt}
       TRIPLE ${ARG_TRIPLE}
       INPUT ${input_file}
       OUTPUT ${output_file}
       EXTRA_OPTS -fno-builtin -nostdlib
         "${ARG_COMPILE_FLAGS}" -I${CMAKE_CURRENT_SOURCE_DIR}/${file_dir}
       DEPENDENCIES ${input_file_dep}
     )
+    list( APPEND compile_tgts ${tgt} )
 
     # Collect all files originating in LLVM IR separately
     get_filename_component( file_ext ${file} EXT )
     if( ${file_ext} STREQUAL ".ll" )
       list( APPEND bytecode_ir_files ${output_file} )
+      list( APPEND compile_tgts ${tgt}-as )
----------------
frasercrmck wrote:

See above - we wouldn't need this case if we could rely on a consistent target name.

https://github.com/llvm/llvm-project/pull/130755


More information about the cfe-commits mailing list