@@ -364,7 +364,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
364
364
set ( spv_suffix ${arch_suffix} .spv )
365
365
add_custom_command ( OUTPUT ${spv_suffix}
366
366
COMMAND ${LLVM_SPIRV} ${spvflags} -o ${spv_suffix} ${builtins_link_lib}
367
- DEPENDS ${builtins_link_lib_tgt }
367
+ DEPENDS ${builtins_link_lib }
368
368
)
369
369
add_custom_target ( "prepare-${spv_suffix} " ALL DEPENDS "${spv_suffix} " )
370
370
install ( FILES ${CMAKE_CURRENT_BINARY_DIR} /${spv_suffix}
@@ -376,7 +376,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
376
376
add_custom_command ( OUTPUT ${builtins_opt_lib_tgt} .bc
377
377
COMMAND libclc::opt ${opt_flags} -o ${builtins_opt_lib_tgt} .bc
378
378
${builtins_link_lib}
379
- DEPENDS libclc::opt ${builtins_link_lib_tgt }
379
+ DEPENDS libclc::opt ${builtins_link_lib }
380
380
)
381
381
add_custom_target ( ${builtins_opt_lib_tgt}
382
382
ALL DEPENDS ${builtins_opt_lib_tgt} .bc
@@ -385,12 +385,13 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
385
385
PROPERTIES TARGET_FILE ${builtins_opt_lib_tgt} .bc
386
386
)
387
387
388
+ set ( builtins_opt_lib $< TARGET_PROPERTY:${builtins_opt_lib_tgt} ,TARGET_FILE> )
389
+
388
390
# Add prepare target
389
391
set ( obj_suffix ${arch_suffix} .bc )
390
392
add_custom_command ( OUTPUT ${obj_suffix}
391
- COMMAND prepare_builtins -o ${obj_suffix}
392
- $< TARGET_PROPERTY:${builtins_opt_lib_tgt} ,TARGET_FILE>
393
- DEPENDS ${builtins_opt_lib_tgt} prepare_builtins )
393
+ COMMAND prepare_builtins -o ${obj_suffix} ${builtins_opt_lib}
394
+ DEPENDS ${builtins_opt_lib} prepare_builtins )
394
395
add_custom_target ( prepare-${obj_suffix} ALL DEPENDS ${obj_suffix} )
395
396
396
397
# nvptx-- targets don't include workitem builtins
0 commit comments