-
-
Save anonymous/6ebf1a48d719d62c7aa7bd661d38e0cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake | |
index cc7445f..1e2baae 100644 | |
--- a/cmake/modules/AddLLVM.cmake | |
+++ b/cmake/modules/AddLLVM.cmake | |
@@ -765,13 +765,16 @@ macro(add_llvm_tool name) | |
set(EXCLUDE_FROM_ALL ON) | |
endif() | |
add_llvm_executable(${name} ${ARGN}) | |
+ if (NOT DEFINED LLVM_TOOLS_INSTALL_DIR) | |
+ set(LLVM_TOOLS_INSTALL_DIR bin) | |
+ endif() | |
list(FIND LLVM_TOOLCHAIN_TOOLS ${name} LLVM_IS_${name}_TOOLCHAIN_TOOL) | |
if (LLVM_IS_${name}_TOOLCHAIN_TOOL GREATER -1 OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) | |
if( LLVM_BUILD_TOOLS ) | |
install(TARGETS ${name} | |
EXPORT LLVMExports | |
- RUNTIME DESTINATION bin | |
+ RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR} | |
COMPONENT ${name}) | |
if (NOT CMAKE_CONFIGURATION_TYPES) | |
@@ -1209,9 +1212,12 @@ function(llvm_install_symlink name dest) | |
set(full_name ${name}${CMAKE_EXECUTABLE_SUFFIX}) | |
set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX}) | |
+ if (NOT DEFINED LLVM_TOOLS_INSTALL_DIR) | |
+ set(LLVM_TOOLS_INSTALL_DIR bin) | |
+ endif() | |
install(SCRIPT ${INSTALL_SYMLINK} | |
- CODE "install_symlink(${full_name} ${full_dest} bin)" | |
+ CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})" | |
COMPONENT ${component}) | |
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT ARG_ALWAYS_GENERATE) | |
diff --git a/cmake/modules/TableGen.cmake b/cmake/modules/TableGen.cmake | |
index fca7d1b..a512b9f 100644 | |
--- a/cmake/modules/TableGen.cmake | |
+++ b/cmake/modules/TableGen.cmake | |
@@ -138,10 +138,13 @@ macro(add_tablegen target project) | |
set_target_properties(${target} PROPERTIES LINK_FLAGS -Wl,--stack,16777216) | |
endif(CMAKE_SIZEOF_VOID_P MATCHES "8") | |
endif( MINGW ) | |
+ if (NOT DEFINED LLVM_TOOLS_INSTALL_DIR) | |
+ set(LLVM_TOOLS_INSTALL_DIR bin) | |
+ endif() | |
if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY) | |
install(TARGETS ${target} | |
EXPORT LLVMExports | |
- RUNTIME DESTINATION bin) | |
+ RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}) | |
endif() | |
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target}) | |
endmacro() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment