Skip to content

Commit a2e67d3

Browse files
mplatingsAleksei.Glushko
authored andcommitted
Use LLVM_USE_SYMLINKS option in install_symlink
The change to potentially use symlinks on Windows was added in https://reviews.llvm.org/D99170. LLVM_USE_SYMLINKS was added more recently in https://reviews.llvm.org/D135578 and allows specifying at configure time whether or not symlinks should be created. The benefit of using this option is it allows building the package on a symlink-capable Windows machine with symlinks disabled so that the resulting package can be used on a Windows machine that doesn't support symlinks. Differential Revision: https://reviews.llvm.org/D145443 (cherry picked from commit 5c602c4)
1 parent 8fa1eb9 commit a2e67d3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/cmake/modules/AddLLVM.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2191,6 +2191,12 @@ function(llvm_install_library_symlink name dest type)
21912191
set(LLVM_LINK_OR_COPY copy)
21922192
endif()
21932193

2194+
if(LLVM_USE_SYMLINKS)
2195+
set(LLVM_LINK_OR_COPY create_symlink)
2196+
else()
2197+
set(LLVM_LINK_OR_COPY copy)
2198+
endif()
2199+
21942200
set(output_dir lib${LLVM_LIBDIR_SUFFIX})
21952201
if(WIN32 AND "${type}" STREQUAL "SHARED")
21962202
set(output_dir "${CMAKE_INSTALL_BINDIR}")

0 commit comments

Comments
 (0)