summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules/TableGen.cmake
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-11-02 05:03:06 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-11-02 05:03:06 +0000
commit39bf89b3820bbd2912d963a5fb136d59c2d95303 (patch)
treea1b281a7d6d47375d84a001df7daf4e446d7a36e /llvm/cmake/modules/TableGen.cmake
parent1d9269a8d61b232cd5a814e0bf587bc89fabbd46 (diff)
downloadbcm5719-llvm-39bf89b3820bbd2912d963a5fb136d59c2d95303.tar.gz
bcm5719-llvm-39bf89b3820bbd2912d963a5fb136d59c2d95303.zip
The TableGen parts of the CMake build are seriously broken. This fixes
one aspect of them by having them use the (annoying, if not broken) proper library dependency model for adding the LLVMTableGen library as a dependency. This could manifest as a link order issue in the presence of separate LLVM / Clang source builds with CMake and a linker that really cares about such things. Also, add the Support dependency to llvm-tblgen itself so that it doesn't rely on TableGen's transitive Support dependency. A parallel change for clang-tblgen will be forthcoming. llvm-svn: 143531
Diffstat (limited to 'llvm/cmake/modules/TableGen.cmake')
-rw-r--r--llvm/cmake/modules/TableGen.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake
index 3dc820b4abf..6fd48e2ad9e 100644
--- a/llvm/cmake/modules/TableGen.cmake
+++ b/llvm/cmake/modules/TableGen.cmake
@@ -76,7 +76,10 @@ endif()
macro(add_tablegen target project)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR})
+ set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS})
+ set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen)
add_llvm_utility(${target} ${ARGN})
+ set(LLVM_LINK_COMPONENTS ${target}_OLD_LLVM_LINK_COMPONENTS)
set(${project}_TABLEGEN "${target}" CACHE
STRING "Native TableGen executable. Saves building one when cross-compiling.")
@@ -110,7 +113,6 @@ macro(add_tablegen target project)
endif()
endif()
- target_link_libraries(${target} LLVMSupport LLVMTableGen)
if( MINGW )
target_link_libraries(${target} imagehlp psapi)
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
OpenPOWER on IntegriCloud