[libclc] Reland "[libclc] Create aliases with custom_command (#115885)" (PR #116025)
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 13 03:05:02 PST 2024
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/116025
This relands commit 2c980310f67c13dd89c8702d40abeab47a4a2b4b after fixing an issue.
>From beb58052420070d392f97bfba6af6af818df9a16 Mon Sep 17 00:00:00 2001
From: Fraser Cormack <fraser at codeplay.com>
Date: Wed, 13 Nov 2024 10:38:40 +0000
Subject: [PATCH] Reland "[libclc] Create aliases with custom_command
(#115885)"
This relands commit 2c980310f67c13dd89c8702d40abeab47a4a2b4b after
fixing an issue.
---
libclc/cmake/modules/AddLibclc.cmake | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/libclc/cmake/modules/AddLibclc.cmake b/libclc/cmake/modules/AddLibclc.cmake
index ee7c8500c8359f..b520626c6ffd13 100644
--- a/libclc/cmake/modules/AddLibclc.cmake
+++ b/libclc/cmake/modules/AddLibclc.cmake
@@ -355,11 +355,14 @@ 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 ${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