[CMake] Support symlinks even with LLVM_INSTALL_TOOLCHAIN_ONLY

When LLVM_INSTALL_TOOLCHAIN_ONLY is used and LLVM_TOOLCHAIN_TOOLS
contains a tool which is a symlink, it would be ignored. This already
worked before but got broken in r282510.

Differential Revision: https://reviews.llvm.org/D25067

llvm-svn: 282844
This commit is contained in:
Petr Hosek 2016-09-30 06:29:28 +00:00
parent f3e671e020
commit acac3ab779
1 changed files with 3 additions and 3 deletions

View File

@ -1264,11 +1264,11 @@ function(add_llvm_tool_symlink name dest)
set_target_properties(${target_name} PROPERTIES FOLDER Tools)
# Make sure both the link and target are toolchain tools
if (NOT ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT ${dest} IN_LIST LLVM_TOOLCHAIN_TOOLS)
return()
if (${name} IN_LIST LLVM_TOOLCHAIN_TOOLS AND ${dest} IN_LIST LLVM_TOOLCHAIN_TOOLS)
set(TOOL_IS_TOOLCHAIN ON)
endif()
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_TOOLS )
if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS)
llvm_install_symlink(${name} ${dest})
endif()
endif()