[libclc] [libclc] Fix installed symlinks to be relative again (PR #149728)
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 21 07:39:18 PDT 2025
================
@@ -425,17 +425,21 @@ function(add_libclc_builtin_set)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
endif()
- if(CMAKE_HOST_UNIX OR LLVM_USE_SYMLINKS)
- set(LIBCLC_LINK_OR_COPY create_symlink)
- else()
- set(LIBCLC_LINK_OR_COPY copy)
- endif()
-
foreach( a IN LISTS ARG_ALIASES )
+ if(CMAKE_HOST_UNIX OR LLVM_USE_SYMLINKS)
+ cmake_path(RELATIVE_PATH libclc_builtins_lib
+ BASE_DIRECTORY ${LIBCLC_OUTPUT_LIBRARY_DIR}
----------------
frasercrmck wrote:
Perhaps best leave it as you've got it here, as it's more robust to changes. If (some) files are moved in the future, everything would _likely_ still be relative to `LIBCLC_OUTPUT_LIBRARY_DIR` which is the thing that would most likely change. But I don't see the harm in having it as is.
https://github.com/llvm/llvm-project/pull/149728
More information about the cfe-commits
mailing list