llvm.org GIT mirror llvm / 3a210e2
Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally." This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113819 91177308-0d34-0410-b5e6-96231b3b80d8 Michael J. Spencer 9 years ago
62 changed file(s) with 349 addition(s) and 343 deletion(s). Raw diff Collapse all Expand all
271271
272272 # Everything else depends on Support and System:
273273 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} ${LLVM_LIBS} )
274 set(LLVM_COMMON_LIBS LLVMSupport LLVMSystem)
275274
276275 set(LLVM_TABLEGEN "tblgen" CACHE
277276 STRING "Native TableGen executable. Saves building one when cross-compiling.")
372371
373372 add_subdirectory(cmake/modules)
374373
375 install(EXPORT LLVM
376 DESTINATION lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/
377 FILE LLVMTargets.cmake
378 )
379
380374 install(DIRECTORY include/
381375 DESTINATION include
382376 FILES_MATCHING
0 include(LLVMProcessSources)
1
2 function(get_system_libs return_var)
3 # Returns in `return_var' a list of system libraries used by LLVM.
4 if( NOT MSVC )
5 if( MINGW )
6 set(system_libs ${system_libs} imagehlp psapi)
7 elseif( CMAKE_HOST_UNIX )
8 if( HAVE_LIBDL )
9 set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
10 endif()
11 if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
12 set(system_libs ${system_libs} pthread)
13 endif()
14 endif( MINGW )
15 endif( NOT MSVC )
16 set(${return_var} ${system_libs} PARENT_SCOPE)
17 endfunction(get_system_libs)
1 include(LLVMConfig)
182
193 macro(add_llvm_library name)
204 llvm_process_sources( ALL_FILES ${ARGN} )
248 if( LLVM_COMMON_DEPENDS )
259 add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
2610 endif( LLVM_COMMON_DEPENDS )
27 if (LLVM_COMMON_LIBS)
28 target_link_libraries(${name} ${LLVM_COMMON_LIBS})
29 endif()
3011 install(TARGETS ${name}
31 EXPORT LLVM
3212 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
3313 ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
3414 # The LLVM Target library shall be built before its sublibraries
5737 endif()
5838
5939 install(TARGETS ${name}
60 EXPORT LLVM
6140 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
6241 ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
6342 endif()
7756 target_link_libraries( ${name} ${lib} )
7857 endforeach(lib)
7958 endif( LLVM_USED_LIBS )
59 if( LLVM_LINK_COMPONENTS )
60 llvm_config(${name} ${LLVM_LINK_COMPONENTS})
61 endif( LLVM_LINK_COMPONENTS )
8062 if( LLVM_COMMON_DEPENDS )
8163 add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
8264 endif( LLVM_COMMON_DEPENDS )
83 if (LLVM_COMMON_LIBS)
84 target_link_libraries(${name} ${LLVM_COMMON_LIBS})
85 endif()
8665 if( NOT MINGW )
8766 get_system_libs(llvm_system_libs)
8867 if( llvm_system_libs )
129108 endif (TABLEGEN_OUTPUT)
130109 set(CURRENT_LLVM_TARGET LLVM${target_name} PARENT_SCOPE)
131110 endmacro(add_llvm_target)
132
133 macro(llvm_get_target_libraries return_var)
134 set( link_components ${ARGN} )
135 foreach(c ${link_components})
136 # add codegen, asmprinter, asmparser, disassembler
137 list(FIND LLVM_TARGETS_TO_BUILD ${c} idx)
138 if( NOT idx LESS 0 )
139 list(FIND llvm_libs "LLVM${c}CodeGen" idx)
140 if( NOT idx LESS 0 )
141 list(APPEND expanded_components "LLVM${c}CodeGen")
142 else()
143 list(FIND llvm_libs "LLVM${c}" idx)
144 if( NOT idx LESS 0 )
145 list(APPEND expanded_components "LLVM${c}")
146 else()
147 message(FATAL_ERROR "Target ${c} is not in the set of libraries.")
148 endif()
149 endif()
150 list(FIND llvm_libs "LLVM${c}AsmPrinter" asmidx)
151 if( NOT asmidx LESS 0 )
152 list(APPEND expanded_components "LLVM${c}AsmPrinter")
153 endif()
154 list(FIND llvm_libs "LLVM${c}AsmParser" asmidx)
155 if( NOT asmidx LESS 0 )
156 list(APPEND expanded_components "LLVM${c}AsmParser")
157 endif()
158 list(FIND llvm_libs "LLVM${c}Info" asmidx)
159 if( NOT asmidx LESS 0 )
160 list(APPEND expanded_components "LLVM${c}Info")
161 endif()
162 list(FIND llvm_libs "LLVM${c}Disassembler" asmidx)
163 if( NOT asmidx LESS 0 )
164 list(APPEND expanded_components "LLVM${c}Disassembler")
165 endif()
166 elseif( c STREQUAL "native" )
167 list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
168 elseif( c STREQUAL "nativecodegen" )
169 list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
170 elseif( c STREQUAL "backend" )
171 # same case as in `native'.
172 elseif( c STREQUAL "engine" OR c STREQUAL "jit")
173 # TODO: as we assume we are on X86, this is `jit'.
174 list(APPEND expanded_components "LLVMJIT")
175 elseif( c STREQUAL "interpreter" )
176 list(APPEND expanded_components "LLVMInterpreter")
177 elseif( c STREQUAL "all" )
178 list(APPEND expanded_components ${llvm_libs})
179 else( NOT idx LESS 0 )
180 list(APPEND expanded_components LLVM${c})
181 endif( NOT idx LESS 0 )
182 endforeach(c)
183 set(${return_var} ${expanded_components})
184 endmacro(llvm_get_target_libraries)
185
186 macro(add_llvm_link_components target_name)
187 llvm_get_target_libraries(target_libs ${ARGN})
188 target_link_libraries(${target_name} ${target_libs})
189 endmacro()
None set(LLVM_CFLAGS "${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
1 set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
2 set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
3 llvm_get_target_libraries(LLVM_JIT_LIBS jit)
4 llvm_get_target_libraries(LLVM_INTERPRETER_LIBS interpreter)
5 llvm_get_target_libraries(LLVM_NATIVECODEGEN_LIBS nativecodegen)
6 get_system_libs(LLVM_SYSTEM_LIBS)
0 set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/cmake")
71
82 configure_file(
9 LLVMConfig.cmake.in
10 ${LLVM_BINARY_DIR}/cmake/modules/LLVMConfig.cmake
11 @ONLY
12 )
3 LLVM.cmake
4 ${llvm_cmake_builddir}/LLVM.cmake
5 @ONLY)
136
147 install(FILES
15 ${LLVM_BINARY_DIR}/cmake/modules/LLVMConfig.cmake
16 DESTINATION lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/
17 )
8 ${llvm_cmake_builddir}/LLVM.cmake
9 LLVMConfig.cmake
10 LLVMLibDeps.cmake
11 DESTINATION share/llvm/cmake)
0 function(get_system_libs return_var)
1 # Returns in `return_var' a list of system libraries used by LLVM.
2 if( NOT MSVC )
3 if( MINGW )
4 set(system_libs ${system_libs} imagehlp psapi)
5 elseif( CMAKE_HOST_UNIX )
6 if( HAVE_LIBDL )
7 set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
8 endif()
9 if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
10 set(system_libs ${system_libs} pthread)
11 endif()
12 endif( MINGW )
13 endif( NOT MSVC )
14 set(${return_var} ${system_libs} PARENT_SCOPE)
15 endfunction(get_system_libs)
16
17
18 function(is_llvm_target_library library return_var)
19 # Sets variable `return_var' to ON if `library' corresponds to a
20 # LLVM supported target. To OFF if it doesn't.
21 set(${return_var} OFF PARENT_SCOPE)
22 string(TOUPPER "${library}" capitalized_lib)
23 string(TOUPPER "${LLVM_ALL_TARGETS}" targets)
24 foreach(t ${targets})
25 if( capitalized_lib STREQUAL "LLVM${t}" OR
26 capitalized_lib STREQUAL "LLVM${t}CODEGEN" OR
27 capitalized_lib STREQUAL "LLVM${t}ASMPARSER" OR
28 capitalized_lib STREQUAL "LLVM${t}ASMPRINTER" OR
29 capitalized_lib STREQUAL "LLVM${t}DISASSEMBLER" OR
30 capitalized_lib STREQUAL "LLVM${t}INFO" )
31 set(${return_var} ON PARENT_SCOPE)
32 break()
33 endif()
34 endforeach()
35 endfunction(is_llvm_target_library)
36
37
38 macro(llvm_config executable)
39 explicit_llvm_config(${executable} ${ARGN})
40 endmacro(llvm_config)
41
42
43 function(explicit_llvm_config executable)
44 set( link_components ${ARGN} )
45
46 explicit_map_components_to_libraries(LIBRARIES ${link_components})
47 target_link_libraries(${executable} ${LIBRARIES})
48 endfunction(explicit_llvm_config)
49
50
51 # This is a variant intended for the final user:
52 function(llvm_map_components_to_libraries OUT_VAR)
53 explicit_map_components_to_libraries(result ${ARGN})
54 get_system_libs(sys_result)
55 set( ${OUT_VAR} ${result} ${sys_result} PARENT_SCOPE )
56 endfunction(llvm_map_components_to_libraries)
57
58
59 function(explicit_map_components_to_libraries out_libs)
60 set( link_components ${ARGN} )
61 foreach(c ${link_components})
62 # add codegen, asmprinter, asmparser, disassembler
63 list(FIND LLVM_TARGETS_TO_BUILD ${c} idx)
64 if( NOT idx LESS 0 )
65 list(FIND llvm_libs "LLVM${c}CodeGen" idx)
66 if( NOT idx LESS 0 )
67 list(APPEND expanded_components "LLVM${c}CodeGen")
68 else()
69 list(FIND llvm_libs "LLVM${c}" idx)
70 if( NOT idx LESS 0 )
71 list(APPEND expanded_components "LLVM${c}")
72 else()
73 message(FATAL_ERROR "Target ${c} is not in the set of libraries.")
74 endif()
75 endif()
76 list(FIND llvm_libs "LLVM${c}AsmPrinter" asmidx)
77 if( NOT asmidx LESS 0 )
78 list(APPEND expanded_components "LLVM${c}AsmPrinter")
79 endif()
80 list(FIND llvm_libs "LLVM${c}AsmParser" asmidx)
81 if( NOT asmidx LESS 0 )
82 list(APPEND expanded_components "LLVM${c}AsmParser")
83 endif()
84 list(FIND llvm_libs "LLVM${c}Info" asmidx)
85 if( NOT asmidx LESS 0 )
86 list(APPEND expanded_components "LLVM${c}Info")
87 endif()
88 list(FIND llvm_libs "LLVM${c}Disassembler" asmidx)
89 if( NOT asmidx LESS 0 )
90 list(APPEND expanded_components "LLVM${c}Disassembler")
91 endif()
92 elseif( c STREQUAL "native" )
93 list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
94 elseif( c STREQUAL "nativecodegen" )
95 list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
96 elseif( c STREQUAL "backend" )
97 # same case as in `native'.
98 elseif( c STREQUAL "engine" )
99 # TODO: as we assume we are on X86, this is `jit'.
100 list(APPEND expanded_components "LLVMJIT")
101 elseif( c STREQUAL "all" )
102 list(APPEND expanded_components ${llvm_libs})
103 else( NOT idx LESS 0 )
104 list(APPEND expanded_components LLVM${c})
105 endif( NOT idx LESS 0 )
106 endforeach(c)
107 # We must match capitalization.
108 string(TOUPPER "${llvm_libs}" capitalized_libs)
109 list(REMOVE_DUPLICATES expanded_components)
110 list(LENGTH expanded_components lst_size)
111 set(result "")
112 while( 0 LESS ${lst_size} )
113 list(GET expanded_components 0 c)
114 string(TOUPPER "${c}" capitalized)
115 list(FIND capitalized_libs ${capitalized} idx)
116 set(add_it ON)
117 if( idx LESS 0 )
118 # The library is unkown. Maybe is an ommitted target?
119 is_llvm_target_library(${c} iltl_result)
120 if( NOT iltl_result )
121 message(FATAL_ERROR "Library ${c} not found in list of llvm libraries.")
122 endif()
123 set(add_it OFF)
124 endif( idx LESS 0 )
125 list(GET llvm_libs ${idx} canonical_lib)
126 list(REMOVE_ITEM result ${canonical_lib})
127 foreach(c ${MSVC_LIB_DEPS_${canonical_lib}})
128 list(REMOVE_ITEM expanded_components ${c})
129 endforeach()
130 if( add_it )
131 list(APPEND result ${canonical_lib})
132 list(APPEND expanded_components ${MSVC_LIB_DEPS_${canonical_lib}})
133 endif()
134 list(REMOVE_AT expanded_components 0)
135 list(LENGTH expanded_components lst_size)
136 endwhile( 0 LESS ${lst_size} )
137 set(${out_libs} ${result} PARENT_SCOPE)
138 endfunction(explicit_map_components_to_libraries)
139
140
141 # The library dependency data is contained in the file
142 # LLVMLibDeps.cmake on this directory. It is automatically generated
143 # by tools/llvm-config/CMakeLists.txt when the build comprises all the
144 # targets and we are on a environment Posix enough to build the
145 # llvm-config script. This, in practice, just excludes MSVC.
146
147 # When you remove or rename a library from the build, be sure to
148 # remove its file from lib/ as well, or the GenLibDeps.pl script will
149 # include it on its analysis!
150
151 # The format generated by GenLibDeps.pl
152
153 # libLLVMARMAsmPrinter.a: libLLVMMC.a libLLVMSupport.a
154
155 # is translated to:
156
157 # set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport)
158
159 # It is necessary to remove the `lib' prefix and the `.a' suffix.
160
161 # This 'sed' script should do the trick:
162 # sed -e s'#\.a##g' -e 's#libLLVM#LLVM#g' -e 's#: # #' -e 's#\(.*\)#set(MSVC_LIB_DEPS_\1)#' ~/llvm/tools/llvm-config/LibDeps.txt
163
164 include(LLVMLibDeps)
+0
-11
cmake/modules/LLVMConfig.cmake.in less more
None get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
1 include(${SELF_DIR}/LLVMTargets.cmake)
2 get_filename_component(LLVM_INCLUDE_DIRS "${SELF_DIR}/../../../include" ABSOLUTE)
3 set(LLVM_CPPFLAGS "@LLVM_CPPFLAGS@")
4 set(LLVM_CFLAGS "@LLVM_CFLAGS@")
5 set(LLVM_CXXFLAGS "@LLVM_CXXFLAGS@")
6 set(LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@")
7 set(LLVM_JIT_LIBS "@LLVM_JIT_LIBS@")
8 set(LLVM_INTERPRETER_LIBS "@LLVM_INTERPRETER_LIBS@")
9 set(LLVM_NATIVECODEGEN_LIBS "@LLVM_NATIVECODEGEN_LIBS@")
10 set(LLVM_BUILDMODE "@LLVM_BUILDMODE@")
0 set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
1 set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport)
2 set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMAsmPrinter LLVMARMInfo LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
3 set(MSVC_LIB_DEPS_LLVMARMInfo LLVMSupport)
4 set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
5 set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
6 set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMSupport)
7 set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget)
8 set(MSVC_LIB_DEPS_LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
9 set(MSVC_LIB_DEPS_LLVMAsmParser LLVMCore LLVMSupport)
10 set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMMCParser LLVMSupport LLVMSystem LLVMTarget)
11 set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport)
12 set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport)
13 set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
14 set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
15 set(MSVC_LIB_DEPS_LLVMBlackfinInfo LLVMSupport)
16 set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
17 set(MSVC_LIB_DEPS_LLVMCBackendInfo LLVMSupport)
18 set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
19 set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
20 set(MSVC_LIB_DEPS_LLVMCellSPUInfo LLVMSupport)
21 set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
22 set(MSVC_LIB_DEPS_LLVMCore LLVMSupport LLVMSystem)
23 set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMTarget)
24 set(MSVC_LIB_DEPS_LLVMCppBackendInfo LLVMSupport)
25 set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMSupport LLVMSystem LLVMTarget)
26 set(MSVC_LIB_DEPS_LLVMInstCombine LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
27 set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTransformUtils)
28 set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget)
29 set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMSystem LLVMTarget)
30 set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem LLVMTransformUtils)
31 set(MSVC_LIB_DEPS_LLVMMBlazeAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMSupport LLVMTarget)
32 set(MSVC_LIB_DEPS_LLVMMBlazeCodeGen LLVMCodeGen LLVMCore LLVMMBlazeInfo LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
33 set(MSVC_LIB_DEPS_LLVMMBlazeInfo LLVMSupport)
34 set(MSVC_LIB_DEPS_LLVMMC LLVMSupport LLVMSystem)
35 set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMInfo LLVMAlphaAsmPrinter LLVMAlphaCodeGen LLVMAlphaInfo LLVMBlackfinAsmPrinter LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUAsmPrinter LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmPrinter LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430AsmPrinter LLVMMSP430CodeGen LLVMMSP430Info LLVMMipsAsmPrinter LLVMMipsCodeGen LLVMMipsInfo LLVMPIC16AsmPrinter LLVMPIC16CodeGen LLVMPIC16Info LLVMPowerPCAsmPrinter LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSparcAsmPrinter LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystem LLVMSystemZAsmPrinter LLVMSystemZCodeGen LLVMSystemZInfo LLVMX86AsmParser LLVMX86CodeGen LLVMX86Disassembler LLVMX86Info LLVMXCoreAsmPrinter LLVMXCoreCodeGen LLVMXCoreInfo)
36 set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport)
37 set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSupport LLVMTarget)
38 set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
39 set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMSupport)
40 set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMTarget)
41 set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
42 set(MSVC_LIB_DEPS_LLVMMipsInfo LLVMSupport)
43 set(MSVC_LIB_DEPS_LLVMPIC16AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPIC16CodeGen LLVMPIC16Info LLVMSupport LLVMTarget)
44 set(MSVC_LIB_DEPS_LLVMPIC16CodeGen LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMPIC16Info LLVMSelectionDAG LLVMSupport LLVMTarget)
45 set(MSVC_LIB_DEPS_LLVMPIC16Info LLVMSupport)
46 set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSupport LLVMTarget)
47 set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
48 set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMSupport)
49 set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
50 set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
51 set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcInfo LLVMSupport LLVMTarget)
52 set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
53 set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMSupport)
54 set(MSVC_LIB_DEPS_LLVMSupport LLVMSystem)
55 set(MSVC_LIB_DEPS_LLVMSystem )
56 set(MSVC_LIB_DEPS_LLVMSystemZAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystemZInfo LLVMTarget)
57 set(MSVC_LIB_DEPS_LLVMSystemZCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystemZInfo LLVMTarget)
58 set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMSupport)
59 set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport)
60 set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMipa)
61 set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMTarget LLVMX86Info)
62 set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMMC LLVMSupport)
63 set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86AsmPrinter LLVMX86Info)
64 set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info)
65 set(MSVC_LIB_DEPS_LLVMX86Info LLVMSupport)
66 set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMXCoreInfo)
67 set(MSVC_LIB_DEPS_LLVMXCoreCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMXCoreInfo)
68 set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMSupport)
69 set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport LLVMSystem)
70 set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
0 set(LLVM_LINK_COMPONENTS jit bitwriter nativecodegen interpreter)
1
2 add_llvm_example(BrainF
13 BrainF.cpp
24 BrainFDriver.cpp
35 )
4
5 add_llvm_link_components(BrainF jit nativecodegen interpreter)
6 target_link_libraries(BrainF LLVMBitWriter)
0 set(LLVM_LINK_COMPONENTS jit nativecodegen)
1
2 add_llvm_example(ExceptionDemo
13 ExceptionDemo.cpp
24 )
3
4 add_llvm_link_components(ExceptionDemo jit nativecodegen)
0 set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen)
1
2 add_llvm_example(Fibonacci
13 fibonacci.cpp
24 )
3
4 add_llvm_link_components(Fibonacci jit interpreter nativecodegen)
0 set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen)
1
2 add_llvm_example(HowToUseJIT
13 HowToUseJIT.cpp
24 )
3
4 add_llvm_link_components(HowToUseJIT jit interpreter nativecodegen)
0 set(LLVM_LINK_COMPONENTS core)
1
2 add_llvm_example(Kaleidoscope-Ch3
13 toy.cpp
24 )
3
4 target_link_libraries(Kaleidoscope-Ch3 LLVMCore)
0 set(LLVM_LINK_COMPONENTS core jit interpreter native)
1
2 add_llvm_example(Kaleidoscope-Ch4
13 toy.cpp
24 )
3
4 add_llvm_link_components(Kaleidoscope-Ch4 jit interpreter native)
5 target_link_libraries(Kaleidoscope-Ch4 LLVMCore)
0 set(LLVM_LINK_COMPONENTS core jit interpreter native)
1
2 add_llvm_example(Kaleidoscope-Ch5
13 toy.cpp
24 )
3
4 add_llvm_link_components(Kaleidoscope-Ch5 jit interpreter native)
5 target_link_libraries(Kaleidoscope-Ch5 LLVMCore)
0 set(LLVM_LINK_COMPONENTS core jit interpreter native)
1
2 add_llvm_example(Kaleidoscope-Ch6
13 toy.cpp
24 )
3
4 add_llvm_link_components(Kaleidoscope-Ch6 jit interpreter native)
5 target_link_libraries(Kaleidoscope-Ch6 LLVMCore)
0 set(LLVM_LINK_COMPONENTS core jit interpreter native)
1
2 add_llvm_example(Kaleidoscope-Ch7
13 toy.cpp
24 )
3
4 add_llvm_link_components(Kaleidoscope-Ch7 jit interpreter native)
5 target_link_libraries(Kaleidoscope-Ch7 LLVMCore)
0 set(LLVM_LINK_COMPONENTS bitwriter)
1
2 add_llvm_example(ModuleMaker
13 ModuleMaker.cpp
24 )
3
4 target_link_libraries(ModuleMaker LLVMBitWriter LLVMCore)
0 set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen)
1
2 add_llvm_example(ParallelJIT
13 ParallelJIT.cpp
24 )
35
4 add_llvm_link_components(ParallelJIT jit interpreter nativecodegen)
5
66 if(HAVE_LIBPTHREAD)
77 target_link_libraries(ParallelJIT pthread)
88 endif(HAVE_LIBPTHREAD)
4949 ValueTracking.cpp
5050 )
5151
52 target_link_libraries(LLVMAnalysis LLVMCore LLVMTarget)
52 target_link_libraries (LLVMAnalysis LLVMSupport)
33 FindUsedTypes.cpp
44 GlobalsModRef.cpp
55 )
6
7 target_link_libraries(LLVMipa LLVMAnalysis LLVMCore)
22 ArchiveReader.cpp
33 ArchiveWriter.cpp
44 )
5
6 target_link_libraries(LLVMArchive LLVMBitReader LLVMCore)
33 LLParser.cpp
44 Parser.cpp
55 )
6
7 target_link_libraries(LLVMAsmParser LLVMCore)
11 BitReader.cpp
22 BitcodeReader.cpp
33 )
4
5 target_link_libraries(LLVMBitReader LLVMCore)
77 OcamlGCPrinter.cpp
88 )
99
10 target_link_libraries (LLVMAsmPrinter
11 LLVMAnalysis
12 LLVMCodeGen
13 LLVMCore
14 LLVMMC
15 LLVMMCParser
16 LLVMTarget
17 )
10 target_link_libraries (LLVMAsmPrinter LLVMMCParser)
8282 VirtRegRewriter.cpp
8383 )
8484
85 target_link_libraries (LLVMCodeGen
86 LLVMAnalysis
87 LLVMCore
88 LLVMMC
89 LLVMScalarOpts
90 LLVMTarget
91 LLVMTransformUtils
92 )
85 target_link_libraries (LLVMCodeGen LLVMCore LLVMScalarOpts)
2121 TargetSelectionDAGInfo.cpp
2222 )
2323
24 target_link_libraries(LLVMSelectionDAG
25 LLVMAnalysis
26 LLVMCodeGen
27 LLVMCore
28 LLVMMC
29 LLVMTarget
30 )
24 target_link_libraries (LLVMSelectionDAG LLVMAnalysis LLVMAsmPrinter LLVMCodeGen)
0 set(LLVM_LINK_COMPONENTS support system)
1 set(LLVM_REQUIRES_EH 1)
12
23 add_llvm_tool(llvmc
11 ExecutionEngine.cpp
22 ExecutionEngineBindings.cpp
33 )
4
5 target_link_libraries(LLVMExecutionEngine LLVMCore LLVMTarget)
22 ExternalFunctions.cpp
33 Interpreter.cpp
44 )
5
6 target_link_libraries(LLVMInterpreter
7 LLVMCodeGen
8 LLVMCore
9 LLVMExecutionEngine
10 LLVMTarget
11 )
1010 OProfileJITEventListener.cpp
1111 TargetSelect.cpp
1212 )
13
14 target_link_libraries(LLVMJIT
15 LLVMCodeGen
16 LLVMCore
17 LLVMExecutionEngine
18 LLVMMC
19 LLVMTarget
20 )
33 LinkModules.cpp
44 Linker.cpp
55 )
6
7 target_link_libraries(LLVMLinker
8 LLVMArchive
9 LLVMBitReader
10 LLVMCore
11 LLVMTransformUtils
12 )
0
1 add_llvm_library(LLVMMCDisassembler
12 EDDisassembler.cpp
23 EDOperand.cpp
34 EDInst.cpp
45 EDToken.cpp
56 )
6
7 add_llvm_link_components(LLVMMCDisassembler all)
44 ARMAsmParser.cpp
55 )
66
7 target_link_libraries(LLVMARMAsmParser
8 LLVMARMInfo
9 LLVMMC
10 LLVMMCParser
11 LLVMTarget
12 )
22 add_llvm_library(LLVMARMAsmPrinter
33 ARMInstPrinter.cpp
44 )
5
65 add_dependencies(LLVMARMAsmPrinter ARMCodeGenTable_gen)
7 target_link_libraries(LLVMARMAsmPrinter LLVMMC)
4545 Thumb2SizeReduction.cpp
4646 )
4747
48 target_link_libraries (LLVMARMCodeGen
49 LLVMARMInfo
50 LLVMAnalysis
51 LLVMAsmPrinter
52 LLVMCodeGen
53 LLVMCore
54 LLVMMC
55 LLVMSelectionDAG
56 LLVMTarget
57 )
48 target_link_libraries (LLVMARMCodeGen LLVMARMAsmPrinter LLVMSelectionDAG)
1212 TargetRegisterInfo.cpp
1313 TargetSubtarget.cpp
1414 )
15
16 target_link_libraries(LLVMTarget LLVMCore LLVMMC)
33 X86AsmLexer.cpp
44 X86AsmParser.cpp
55 )
6
76 add_dependencies(LLVMX86AsmParser X86CodeGenTable_gen)
8 target_link_libraries(LLVMX86AsmParser
9 LLVMMC
10 LLVMMCParser
11 LLVMTarget
12 LLVMX86Info
13 )
44 X86IntelInstPrinter.cpp
55 X86InstComments.cpp
66 )
7
87 add_dependencies(LLVMX86AsmPrinter X86CodeGenTable_gen)
9 target_link_libraries(LLVMX86AsmPrinter LLVMMC)
2828 X86InstrInfo.cpp
2929 X86JITInfo.cpp
3030 X86MCAsmInfo.cpp
31 X86MCCodeEmitter.cpp
31 X86MCCodeEmitter.cpp
3232 X86MCInstLower.cpp
3333 X86RegisterInfo.cpp
3434 X86SelectionDAGInfo.cpp
4848 endif()
4949
5050 add_llvm_target(X86CodeGen ${sources})
51 target_link_libraries(LLVMX86CodeGen
52 LLVMAnalysis
53 LLVMAsmPrinter
54 LLVMCodeGen
55 LLVMCore
56 LLVMMC
57 LLVMSelectionDAG
58 LLVMTarget
59 LLVMX86AsmPrinter
60 LLVMX86Info
61 )
51
1010 PROPERTY COMPILE_FLAGS "/Od"
1111 )
1212 endif()
13
1413 add_dependencies(LLVMX86Disassembler X86CodeGenTable_gen)
15 target_link_libraries(LLVMX86Disassembler LLVMMC LLVMX86Info)
2323 StructRetPromotion.cpp
2424 )
2525
26 target_link_libraries(LLVMipo
27 LLVMAnalysis
28 LLVMCore
29 LLVMScalarOpts
30 LLVMTarget
31 LLVMTransformUtils
32 LLVMipa
33 )
26 target_link_libraries (LLVMipo LLVMScalarOpts LLVMInstCombine)
88 InstCombineMulDivRem.cpp
99 InstCombinePHI.cpp
1010 InstCombineSelect.cpp
11 InstCombineShifts.cpp
11 InstCombineShifts.cpp
1212 InstCombineSimplifyDemanded.cpp
1313 InstCombineVectorOps.cpp
1414 )
1515
16 target_link_libraries(LLVMInstCombine
17 LLVMAnalysis
18 LLVMCore
19 LLVMTarget
20 LLVMTransformUtils
21 )
16 target_link_libraries (LLVMInstCombine LLVMTransformUtils)
22 OptimalEdgeProfiling.cpp
33 ProfilingUtils.cpp
44 )
5
6 target_link_libraries(LLVMInstrumentation
7 LLVMAnalysis
8 LLVMCore
9 LLVMTransformUtils
10 )
3131 TailRecursionElimination.cpp
3232 )
3333
34 target_link_libraries (LLVMScalarOpts
35 LLVMAnalysis
36 LLVMCore
37 LLVMInstCombine
38 LLVMTarget
39 LLVMTransformUtils
40 )
34 target_link_libraries (LLVMScalarOpts LLVMTransformUtils)
2424 ValueMapper.cpp
2525 )
2626
27 target_link_libraries(LLVMTransformUtils
28 LLVMAnalysis
29 LLVMCore
30 LLVMTarget
31 LLVMipa
32 )
27 target_link_libraries (LLVMTransformUtils LLVMSupport)
0 # NOTE: The tools are organized into five groups of four consisting of one
11 # large and three small executables. This is done to minimize memory load
22 # in parallel builds. Please retain this ordering.
3
4 if( NOT WIN32 OR MSYS OR CYGWIN )
5 # It is useful to build llvm-config before the other tools, so we
6 # have a fresh LibDeps.txt for regenerating the hard-coded library
7 # dependencies. llvm-config/CMakeLists.txt takes care of this but we
8 # must keep llvm-config as the first entry on the list of tools to
9 # be built.
10 add_subdirectory(llvm-config)
11 endif()
312
413 add_subdirectory(opt)
514 add_subdirectory(llvm-as)
2837
2938 if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
3039 add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/clang )
31 endif()
40 endif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
41
42 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
0 set(LLVM_LINK_COMPONENTS asmparser instrumentation scalaropts ipo
1 linker bitreader bitwriter)
2
3 add_llvm_tool(bugpoint
14 BugDriver.cpp
25 CrashDebugger.cpp
811 ToolRunner.cpp
912 bugpoint.cpp
1013 )
11
12 target_link_libraries(bugpoint
13 LLVMAsmParser
14 LLVMInstrumentation
15 LLVMScalarOpts
16 LLVMipo
17 LLVMLinker
18 LLVMBitReader
19 LLVMBitWriter
20 )
0 set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} bitreader asmparser)
1
2 add_llvm_tool(llc
13 llc.cpp
24 )
3
4 add_llvm_link_components(llc all)
5 target_link_libraries(llc LLVMBitReader LLVMAsmParser)
0 set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen bitreader selectiondag)
1
2 add_llvm_tool(lli
13 lli.cpp
24 )
3
4 add_llvm_link_components(lli jit interpreter nativecodegen)
5 target_link_libraries(lli LLVMBitReader LLVMSelectionDAG)
0 set(LLVM_LINK_COMPONENTS archive)
1 set(LLVM_REQUIRES_EH 1)
12
23 add_llvm_tool(llvm-ar
34 llvm-ar.cpp
45 )
56
6 target_link_libraries(llvm-ar LLVMArchive)
7
87 # TODO: Support check-local.
0 set(LLVM_LINK_COMPONENTS asmparser bitwriter)
1 set(LLVM_REQUIRES_EH 1)
12
23 add_llvm_tool(llvm-as
34 llvm-as.cpp
45 )
5
6 target_link_libraries(llvm-as LLVMAsmParser LLVMBitWriter)
0 set(LLVM_LINK_COMPONENTS bitreader)
1 set(LLVM_REQUIRES_EH 1)
12
23 add_llvm_tool(llvm-bcanalyzer
34 llvm-bcanalyzer.cpp
45 )
5
6 target_link_libraries(llvm-bcanalyzer LLVMBitReader)
109109
110110 add_dependencies(llvm-config.target ${llvm_lib_targets})
111111
112 # Make sure that llvm-config builds before the llvm tools, so we have
113 # LibDeps.txt and can use it for updating the hard-coded library
114 # dependencies on cmake/modules/LLVMLibDeps.cmake when the tools'
115 # build fail due to outdated dependencies:
112116 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} llvm-config.target)
113117
114118 install(FILES ${LLVM_CONFIG}
117121 DESTINATION bin)
118122
119123
124 # Regeneration of library dependencies.
125
126 # See the comments at the end of cmake/modules/LLVMConfig.cmake for
127 # notes and guidelines.
128
129 set(LLVMLibDeps ${LLVM_MAIN_SRC_DIR}/cmake/modules/LLVMLibDeps.cmake)
130 set(LLVMLibDeps_TMP ${CMAKE_CURRENT_BINARY_DIR}/LLVMLibDeps.cmake.tmp)
131
132 add_custom_command(OUTPUT ${LLVMLibDeps_TMP}
133 COMMAND sed -e s'@\\.a@@g' -e s'@\\.so@@g' -e 's@libLLVM@LLVM@g' -e 's@: @ @' -e 's@\\\(.*\\\)@set\(MSVC_LIB_DEPS_\\1\)@' ${FINAL_LIBDEPS} > ${LLVMLibDeps_TMP}
134 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LLVMLibDeps_TMP} ${LLVMLibDeps}
135 DEPENDS ${FINAL_LIBDEPS}
136 COMMENT "Updating cmake library dependencies file ${LLVMLibDeps}"
137 )
138
139 if( LLVM_TARGETS_TO_BUILD STREQUAL LLVM_ALL_TARGETS )
140 add_custom_target(llvmlibdeps.target ALL DEPENDS ${LLVMLibDeps_TMP})
141 add_dependencies(llvmlibdeps.target llvm-config.target)
142 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} llvmlibdeps.target)
143 endif()
144
120145 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
0 set(LLVM_LINK_COMPONENTS support asmparser bitreader)
1
2 add_llvm_tool(llvm-diff
13 llvm-diff.cpp
24 DifferenceEngine.cpp
35 )
4
5 target_link_libraries(llvm-diff LLVMAsmParser LLVMBitReader)
0 set(LLVM_LINK_COMPONENTS bitreader)
1 set(LLVM_REQUIRES_EH 1)
12
23 add_llvm_tool(llvm-dis
34 llvm-dis.cpp
45 )
5
6 target_link_libraries(llvm-dis LLVMCore LLVMBitReader)
0 set(LLVM_LINK_COMPONENTS asmparser ipo bitreader bitwriter)
1
2 add_llvm_tool(llvm-extract
13 llvm-extract.cpp
24 )
3
4 target_link_libraries(llvm-extract
5 LLVMAsmParser
6 LLVMipo
7 LLVMBitReader
8 LLVMBitWriter
9 )
0 set(LLVM_LINK_COMPONENTS ipo scalaropts linker archive bitwriter)
1
2 add_llvm_tool(llvm-ld
13 Optimize.cpp
24 llvm-ld.cpp
35 )
4
5 target_link_libraries(llvm-ld
6 LLVMipo
7 LLVMScalarOpts
8 LLVMLinker
9 LLVMArchive
10 LLVMBitWriter
11 )
0 set(LLVM_LINK_COMPONENTS linker bitreader bitwriter asmparser)
1
2 add_llvm_tool(llvm-link
13 llvm-link.cpp
24 )
3
4 target_link_libraries(llvm-link
5 LLVMLinker
6 LLVMBitReader
7 LLVMBitWriter
8 LLVMAsmParser
9 )
0 set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} support MC MCParser MCDisassembler)
1
2 add_llvm_tool(llvm-mc
13 llvm-mc.cpp
24 Disassembler.cpp
35 )
4
5 add_llvm_link_components(llvm-mc all)
6 target_link_libraries(llvm-mc LLVMMC LLVMMCParser LLVMMCDisassembler)
0 set(LLVM_LINK_COMPONENTS archive bitreader)
1
2 add_llvm_tool(llvm-nm
13 llvm-nm.cpp
24 )
3
4 target_link_libraries(llvm-nm LLVMArchive LLVMBitReader)
0 set(LLVM_LINK_COMPONENTS bitreader analysis)
1
2 add_llvm_tool(llvm-prof
13 llvm-prof.cpp
24 )
3
4 target_link_libraries(llvm-prof LLVMBitReader LLVMAnalysis)
0 set(LLVM_LINK_COMPONENTS archive)
1 set(LLVM_REQUIRES_EH 1)
12
23 add_llvm_tool(llvm-ranlib
34 llvm-ranlib.cpp
45 )
5
6 target_link_libraries(llvm-ranlib LLVMArchive)
0 set(LLVM_LINK_COMPONENTS bitreader asmparser bitwriter instrumentation scalaropts ipo)
1
2 add_llvm_tool(opt
13 AnalysisWrappers.cpp
24 GraphPrinters.cpp
35 PrintSCC.cpp
46 opt.cpp
57 )
6
7 target_link_libraries(opt
8 LLVMBitReader
9 LLVMAsmParser
10 LLVMBitWriter
11 LLVMInstrumentation
12 LLVMScalarOpts
13 LLVMipo
14 )