diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-06-16 20:12:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-06-16 20:12:29 +0000 |
commit | 1555a23335400143f2b54a66aedc4b5cbbb79f8d (patch) | |
tree | 985992c30abab41dd1214ad676c58ad5fa67e88a /CMakeLists.txt | |
parent | c6ac322c1c9544961a29f0fdc592fa2ce1073ca9 (diff) |
Introduce new headers whose inclusion forces linking and
initialization of all targets (InitializeAllTargets.h) or assembler
printers (InitializeAllAsmPrinters.h). This is a step toward the
elimination of relinked object files, so that we can build normal
archives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73543 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e2cf358e41..de3e1594762 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,14 +81,23 @@ if( LLVM_TARGETS_TO_BUILD STREQUAL "all" ) set( LLVM_TARGETS_TO_BUILD ${LLVM_ALL_TARGETS} ) endif() +set(LLVM_ENUM_TARGETS "") foreach(c ${LLVM_TARGETS_TO_BUILD}) list(FIND LLVM_ALL_TARGETS ${c} idx) if( idx LESS 0 ) message(FATAL_ERROR "The target `${c}' does not exists. It should be one of\n${LLVM_ALL_TARGETS}") + else() + set(LLVM_ENUM_TARGETS "${LLVM_ENUM_TARGETS}LLVM_TARGET(${c})\n") endif() endforeach(c) +# Produce llvm/Config/Targets.def +configure_file( + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/Targets.def.in + ${LLVM_BINARY_DIR}/include/llvm/Config/Targets.def + ) + set(llvm_builded_incs_dir ${LLVM_BINARY_DIR}/include/llvm) # The USE_EXPLICIT_DEPENDENCIES variable will be TRUE to indicate that @@ -250,14 +259,23 @@ add_subdirectory(lib/Linker) add_subdirectory(lib/Analysis) add_subdirectory(lib/Analysis/IPA) -foreach(t ${LLVM_TARGETS_TO_BUILD}) + set(LLVM_ENUM_ASM_PRINTERS "") + foreach(t ${LLVM_TARGETS_TO_BUILD}) message(STATUS "Targeting ${t}") add_subdirectory(lib/Target/${t}) if( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/AsmPrinter/CMakeLists.txt ) - add_subdirectory(lib/Target/${t}/AsmPrinter) - endif( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/AsmPrinter/CMakeLists.txt ) + add_subdirectory(lib/Target/${t}/AsmPrinter) + set(LLVM_ENUM_ASM_PRINTERS + "${LLVM_ENUM_ASM_PRINTERS}LLVM_ASM_PRINTER(${t})\n") + endif( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/AsmPrinter/CMakeLists.txt ) endforeach(t) +# Produce llvm/Config/AsmPrinters.def +configure_file( + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmPrinters.def.in + ${LLVM_BINARY_DIR}/include/llvm/Config/AsmPrinters.def + ) + add_subdirectory(lib/ExecutionEngine) add_subdirectory(lib/ExecutionEngine/Interpreter) add_subdirectory(lib/ExecutionEngine/JIT) |