Skip to content

Commit

Permalink
fixup: specify both file and target dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
tcreech-intel committed Jun 11, 2024
1 parent 3e85695 commit b707fc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions libclc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
set( spv_suffix ${arch_suffix}.spv )
add_custom_command( OUTPUT ${spv_suffix}
COMMAND libclc::llvm-spirv ${spvflags} -o ${spv_suffix} ${builtins_link_lib}
DEPENDS ${builtins_link_lib_tgt}
DEPENDS ${builtins_link_lib} ${builtins_link_lib_tgt}
)
add_custom_target( "prepare-${spv_suffix}" ALL DEPENDS "${spv_suffix}" )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${spv_suffix}
Expand All @@ -409,7 +409,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
add_custom_command( OUTPUT ${builtins_opt_lib_tgt}.bc
COMMAND libclc::opt ${opt_flags} -o ${builtins_opt_lib_tgt}.bc
${builtins_link_lib}
DEPENDS libclc::opt ${builtins_link_lib_tgt}
DEPENDS libclc::opt ${builtins_link_lib} ${builtins_link_lib_tgt}
)
add_custom_target( ${builtins_opt_lib_tgt}
ALL DEPENDS ${builtins_opt_lib_tgt}.bc
Expand All @@ -424,7 +424,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
set( obj_suffix ${arch_suffix}.bc )
add_custom_command( OUTPUT ${obj_suffix}
COMMAND prepare_builtins -o ${obj_suffix} ${builtins_opt_lib}
DEPENDS ${builtins_opt_lib_tgt} prepare_builtins )
DEPENDS ${builtins_opt_lib} ${builtins_opt_lib_tgt} prepare_builtins )
add_custom_target( prepare-${obj_suffix} ALL DEPENDS ${obj_suffix} )

# nvptx-- targets don't include workitem builtins
Expand Down
2 changes: 1 addition & 1 deletion libclc/cmake/modules/AddLibclc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function(link_bc)
add_custom_command(
OUTPUT ${ARG_TARGET}.bc
COMMAND libclc::llvm-link -o ${ARG_TARGET}.bc ${LINK_INPUT_ARG}
DEPENDS libclc::llvm-link ${ARG_DEPENDENCIES} ${RSP_FILE}
DEPENDS libclc::llvm-link ${ARG_DEPENDENCIES} ${ARG_INPUTS} ${RSP_FILE}
)

add_custom_target( ${ARG_TARGET} ALL DEPENDS ${ARG_TARGET}.bc )
Expand Down

0 comments on commit b707fc7

Please sign in to comment.