1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

CMake: Revert r79144. It reverted a change necessary for correct

parallel builds.

llvm-svn: 79177
This commit is contained in:
Oscar Fuentes 2009-08-16 05:16:43 +00:00
parent 76b09f600c
commit 5608fb2893
2 changed files with 9 additions and 0 deletions

View File

@ -266,6 +266,7 @@ set(LLVM_ENUM_ASM_PRINTERS "")
set(LLVM_ENUM_ASM_PARSERS "")
foreach(t ${LLVM_TARGETS_TO_BUILD})
message(STATUS "Targeting ${t}")
set(CURRENT_LLVM_TARGET ${t})
add_subdirectory(lib/Target/${t})
add_subdirectory(lib/Target/${t}/TargetInfo)
if( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/AsmPrinter/CMakeLists.txt )
@ -278,6 +279,7 @@ foreach(t ${LLVM_TARGETS_TO_BUILD})
set(LLVM_ENUM_ASM_PARSERS
"${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n")
endif( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/AsmParser/CMakeLists.txt )
set(CURRENT_LLVM_TARGET)
endforeach(t)
# Produce llvm/Config/AsmPrinters.def

View File

@ -12,6 +12,13 @@ macro(add_llvm_library name)
install(TARGETS ${name}
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
# 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} LLVM${CURRENT_LLVM_TARGET})
endif()
endmacro(add_llvm_library name)