https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/152245
The target's output bitcode `libclc_builtins_lib` is located in a sub-directory in clang resource directory since df7473673214. Setting TARGET_FILE property can allow targets in non-libclc project to obtain the path to `libclc_builtins_lib`. >From 6059490236859814d199b5eb9618e4a6759acb44 Mon Sep 17 00:00:00 2001 From: Wenju He <wenju...@intel.com> Date: Tue, 5 Aug 2025 20:45:42 -0700 Subject: [PATCH] [libclc] Set TARGET_FILE property for prepare-${obj_suffix} target The target's output bitcode `libclc_builtins_lib` is located in a sub-directory in clang resource directory since df7473673214. Setting TARGET_FILE property can allow targets in non-libclc project to obtain the path to `libclc_builtins_lib`. --- libclc/cmake/modules/AddLibclc.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libclc/cmake/modules/AddLibclc.cmake b/libclc/cmake/modules/AddLibclc.cmake index 47185586d4094..91d49610eee01 100644 --- a/libclc/cmake/modules/AddLibclc.cmake +++ b/libclc/cmake/modules/AddLibclc.cmake @@ -409,7 +409,10 @@ function(add_libclc_builtin_set) # Add a 'prepare' target add_custom_target( prepare-${obj_suffix} ALL DEPENDS ${libclc_builtins_lib} ) - set_target_properties( "prepare-${obj_suffix}" PROPERTIES FOLDER "libclc/Device IR/Prepare" ) + set_target_properties( "prepare-${obj_suffix}" PROPERTIES + TARGET_FILE ${libclc_builtins_lib} + FOLDER "libclc/Device IR/Prepare" + ) # Also add a 'prepare' target for the triple. Since a triple may have # multiple devices, ensure we only try to create the triple target once. The _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits