[libclc] [libclc] Create aliases with custom_command (PR #115885)
Michał Górny via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 12 23:00:16 PST 2024
================
@@ -355,11 +355,13 @@ function(add_libclc_builtin_set)
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${obj_suffix} DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
foreach( a ${ARG_ALIASES} )
set( alias_suffix "${a}-${ARG_TRIPLE}.bc" )
- add_custom_target( ${alias_suffix} ALL
+ add_custom_command(
+ OUTPUT ${alias_suffix}
COMMAND ${CMAKE_COMMAND} -E create_symlink ${obj_suffix} ${alias_suffix}
DEPENDS prepare-${obj_suffix} )
- set_target_properties( "${alias_suffix}" PROPERTIES FOLDER "libclc/Device IR/Aliases" )
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${alias_suffix} DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
+ add_custom_target( alias-${alias_suffix} ALL DEPENDS ${alias_suffix} )
+ set_target_properties( alias-${alias_suffix} PROPERTIES FOLDER "libclc/Device IR/Aliases" )
+ install( FILES ${alias_suffix} DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
----------------
mgorny wrote:
FYi, restoring `${CMAKE_CURRENT_BINARY_DIR}` here seems to fix the regression.
https://github.com/llvm/llvm-project/pull/115885
More information about the cfe-commits
mailing list