diff options
author | Logan Chien <loganchien@google.com> | 2011-10-20 00:08:13 +0800 |
---|---|---|
committer | Logan Chien <loganchien@google.com> | 2011-10-20 00:09:35 +0800 |
commit | 0ebc07a576037e4e36f68bf5cece32740ca120c0 (patch) | |
tree | c2e40648043d01498ee25af839a071193561e425 /cmake/modules/AddLLVM.cmake | |
parent | 62383e889e0b06fd12a6b88311717cd33a1925c4 (diff) | |
parent | cdd8e46bec4e975d00a5abea808d8eb4138515c5 (diff) | |
download | external_llvm-0ebc07a576037e4e36f68bf5cece32740ca120c0.tar.gz external_llvm-0ebc07a576037e4e36f68bf5cece32740ca120c0.tar.bz2 external_llvm-0ebc07a576037e4e36f68bf5cece32740ca120c0.zip |
Merge with LLVM upstream 2011/10/20 (r142530)
Conflicts:
lib/Support/Unix/Host.inc
Change-Id: Idc00db3b63912dca6348bddd9f8a1af2a8d5d147
Diffstat (limited to 'cmake/modules/AddLLVM.cmake')
-rwxr-xr-x | cmake/modules/AddLLVM.cmake | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index c13143bb0d..b486fe4d82 100755 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -24,16 +24,17 @@ macro(add_llvm_library name) LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) endif() - # The LLVM Target library shall be built before its sublibraries - # (asmprinter, etc) because those may use tablegenned files which - # generation is triggered by the main LLVM target library. Necessary - # for parallel builds: - if( CURRENT_LLVM_TARGET ) - add_dependencies(${name} ${CURRENT_LLVM_TARGET}) - endif() set_target_properties(${name} PROPERTIES FOLDER "Libraries") endmacro(add_llvm_library name) +macro(add_llvm_library_dependencies name) + # Save the dependencies of the LLVM library in a variable so that we can + # query it when resolve llvm-config-style component -> library mappings. + set_property(GLOBAL PROPERTY LLVM_LIB_DEPS_${name} ${ARGN}) + + # Then add the actual dependencies to the library target. + target_link_libraries(${name} ${ARGN}) +endmacro(add_llvm_library_dependencies name) macro(add_llvm_loadable_module name) if( NOT LLVM_ON_UNIX OR CYGWIN ) @@ -124,16 +125,9 @@ endmacro(add_llvm_utility name) macro(add_llvm_target target_name) - if( TABLEGEN_OUTPUT ) - add_custom_target(${target_name}Table_gen - DEPENDS ${TABLEGEN_OUTPUT}) - add_dependencies(${target_name}Table_gen ${LLVM_COMMON_DEPENDS}) - endif( TABLEGEN_OUTPUT ) - include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) + include_directories(BEFORE + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}) add_llvm_library(LLVM${target_name} ${ARGN} ${TABLEGEN_OUTPUT}) - if ( TABLEGEN_OUTPUT ) - add_dependencies(LLVM${target_name} ${target_name}Table_gen) - set_target_properties(${target_name}Table_gen PROPERTIES FOLDER "Tablegenning") - endif (TABLEGEN_OUTPUT) set( CURRENT_LLVM_TARGET LLVM${target_name} ) endmacro(add_llvm_target) |