[libclc] 2c98031 - Revert "[libclc] Create aliases with custom_command (#115885)"

Sylvestre Ledru via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 13 01:05:54 PST 2024


Author: Sylvestre Ledru
Date: 2024-11-13T10:05:37+01:00
New Revision: 2c980310f67c13dd89c8702d40abeab47a4a2b4b

URL: https://github.com/llvm/llvm-project/commit/2c980310f67c13dd89c8702d40abeab47a4a2b4b
DIFF: https://github.com/llvm/llvm-project/commit/2c980310f67c13dd89c8702d40abeab47a4a2b4b.diff

LOG: Revert "[libclc] Create aliases with custom_command (#115885)"
for causing: https://github.com/llvm/llvm-project/issues/115942

This reverts commit 584d1a632f3af0daca4db02f7f3b2c7f48ab0ddf.

Added: 
    

Modified: 
    libclc/cmake/modules/AddLibclc.cmake

Removed: 
    


################################################################################
diff  --git a/libclc/cmake/modules/AddLibclc.cmake b/libclc/cmake/modules/AddLibclc.cmake
index ecf57dc47c22f6..ee7c8500c8359f 100644
--- a/libclc/cmake/modules/AddLibclc.cmake
+++ b/libclc/cmake/modules/AddLibclc.cmake
@@ -355,13 +355,11 @@ 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_command(
-      OUTPUT ${alias_suffix}
+    add_custom_target( ${alias_suffix} ALL
       COMMAND ${CMAKE_COMMAND} -E create_symlink ${obj_suffix} ${alias_suffix}
       DEPENDS prepare-${obj_suffix} )
-    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" )
+    set_target_properties( "${alias_suffix}" PROPERTIES FOLDER "libclc/Device IR/Aliases" )
+    install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${alias_suffix} DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
   endforeach( a )
 endfunction(add_libclc_builtin_set)
 


        


More information about the cfe-commits mailing list