[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)
Wenju He via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 8 07:05:22 PDT 2025
================
@@ -92,10 +95,14 @@ else()
get_host_tool_path( llvm-link LLVM_LINK llvm-link_exe llvm-link_target )
get_host_tool_path( opt OPT opt_exe opt_target )
endif()
-endif()
-# Setup the paths where libclc runtimes should be stored.
-set( LIBCLC_OUTPUT_LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR} )
+ # 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.
+ get_clang_resource_dir( LIBCLC_OUTPUT_DIR PREFIX ${LLVM_LIBRARY_OUTPUT_INTDIR}/.. )
+
+ # Note we do not adhere to LLVM_ENABLE_PER_TARGET_RUNTIME_DIR.
+ set( LIBCLC_OUTPUT_LIBRARY_DIR ${LIBCLC_OUTPUT_DIR}/lib/libclc )
----------------
wenju-he wrote:
will be fixed by https://github.com/llvm/llvm-project/pull/152703
https://github.com/llvm/llvm-project/pull/146503
More information about the cfe-commits
mailing list