Skip to content

Commit 3d1c1a5

Browse files
authored
[libclc] Set TARGET_FILE property for prepare-${obj_suffix} target (#152245)
The target's output bitcode `libclc_builtins_lib` is located in a sub-directory in clang resource directory since df74736. Setting TARGET_FILE property can allow targets in non-libclc project to obtain the path to `libclc_builtins_lib`.
1 parent 7694856 commit 3d1c1a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libclc/cmake/modules/AddLibclc.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,10 @@ function(add_libclc_builtin_set)
409409

410410
# Add a 'prepare' target
411411
add_custom_target( prepare-${obj_suffix} ALL DEPENDS ${libclc_builtins_lib} )
412-
set_target_properties( "prepare-${obj_suffix}" PROPERTIES FOLDER "libclc/Device IR/Prepare" )
412+
set_target_properties( "prepare-${obj_suffix}" PROPERTIES
413+
TARGET_FILE ${libclc_builtins_lib}
414+
FOLDER "libclc/Device IR/Prepare"
415+
)
413416

414417
# Also add a 'prepare' target for the triple. Since a triple may have
415418
# multiple devices, ensure we only try to create the triple target once. The

0 commit comments

Comments
 (0)