https://github.com/wenju-he updated https://github.com/llvm/llvm-project/pull/152703
>From be71d635d2de980797be595c4f35f307c703bc96 Mon Sep 17 00:00:00 2001 From: Wenju He <wenju...@intel.com> Date: Fri, 8 Aug 2025 05:59:54 -0700 Subject: [PATCH] [libclc] Fix libclc install on Windows when MSVC generator is used Fix a regression of df7473673214. cmake MSVC generator is multiple configurations. Build type is not known at configure time and CMAKE_CFG_INTDIR is evaluated to $(Configuration) at configure time. libclc install fails since $(Configuration) in bitcode file path is unresolved in libclc/cmake_install.cmake at install time. We need a solution that resolves libclc bitcode file path at install time. This PR fixes the issue using CMAKE_INSTALL_CONFIG_NAME which can be evaluated at install time. This is the same solution as in https://reviews.llvm.org/D76827 --- libclc/cmake/modules/AddLibclc.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libclc/cmake/modules/AddLibclc.cmake b/libclc/cmake/modules/AddLibclc.cmake index 91d49610eee01..892d151977f83 100644 --- a/libclc/cmake/modules/AddLibclc.cmake +++ b/libclc/cmake/modules/AddLibclc.cmake @@ -425,8 +425,14 @@ function(add_libclc_builtin_set) # targets dependent on libclc. add_dependencies( ${ARG_PARENT_TARGET} prepare-${ARG_TRIPLE} ) + if( NOT CMAKE_CFG_INTDIR STREQUAL "." ) + string( REPLACE ${CMAKE_CFG_INTDIR} "\$\{CMAKE_INSTALL_CONFIG_NAME\}" + libclc_builtins_lib_install ${libclc_builtins_lib} ) + else() + set( libclc_builtins_lib_install ${libclc_builtins_lib} ) + endif() install( - FILES ${libclc_builtins_lib} + FILES ${libclc_builtins_lib_install} DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" ) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits