[libclc] [libclc] Change libclc install dir to ${clang_resource_dir}/lib/libclc in in-tree build (PR #163896)
Wenju He via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 16 17:51:50 PDT 2025
================
@@ -100,10 +101,12 @@ else()
# Setup the paths where libclc runtimes should be stored. By default, in an
# in-tree build we place the libraries in clang's resource driectory.
include(GetClangResourceDir)
- get_clang_resource_dir( LIBCLC_OUTPUT_DIR PREFIX ${LLVM_LIBRARY_OUTPUT_INTDIR}/.. )
+ get_clang_resource_dir( LIBCLC_INSTALL_DIR )
# Note we do not adhere to LLVM_ENABLE_PER_TARGET_RUNTIME_DIR.
- set( LIBCLC_OUTPUT_LIBRARY_DIR ${LIBCLC_OUTPUT_DIR}/lib/libclc )
+ cmake_path( APPEND LIBCLC_INSTALL_DIR "lib" "libclc" )
+ cmake_path( GET LLVM_LIBRARY_OUTPUT_INTDIR PARENT_PATH LIBCLC_OUTPUT_LIBRARY_DIR )
+ cmake_path( APPEND LIBCLC_OUTPUT_LIBRARY_DIR ${LIBCLC_INSTALL_DIR} )
----------------
wenju-he wrote:
> Appending an (likely) absolute path ${LIBCLC_INSTALL_DIR}
not true, get_clang_resource_dir always returns a relative path
https://github.com/llvm/llvm-project/pull/163896
More information about the cfe-commits
mailing list