llvm.org GIT mirror llvm / 4e9c939
CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113632 91177308-0d34-0410-b5e6-96231b3b80d8 Michael J. Spencer 9 years ago
62 changed file(s) with 343 addition(s) and 349 deletion(s). Raw diff Collapse all Expand all
262262
263263 # Everything else depends on Support and System:
264264 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} ${LLVM_LIBS} )
265 set(LLVM_COMMON_LIBS LLVMSupport LLVMSystem)
265266
266267 set(LLVM_TABLEGEN "tblgen" CACHE
267268 STRING "Native TableGen executable. Saves building one when cross-compiling.")
361362
362363 add_subdirectory(cmake/modules)
363364
365 install(EXPORT LLVM
366 DESTINATION lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/
367 FILE LLVMTargets.cmake
368 )
369
364370 install(DIRECTORY include/
365371 DESTINATION include
366372 FILES_MATCHING
0 include(LLVMProcessSources)
1 include(LLVMConfig)
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)
218
319 macro(add_llvm_library name)
420 llvm_process_sources( ALL_FILES ${ARGN} )
824 if( LLVM_COMMON_DEPENDS )
925 add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
1026 endif( LLVM_COMMON_DEPENDS )
27 if (LLVM_COMMON_LIBS)
28 target_link_libraries(${name} ${LLVM_COMMON_LIBS})
29 endif()
1130 install(TARGETS ${name}
31 EXPORT LLVM
1232 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
1333 ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
1434 # The LLVM Target library shall be built before its sublibraries
3757 endif()
3858
3959 install(TARGETS ${name}
60 EXPORT LLVM
4061 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
4162 ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
4263 endif()
5677 target_link_libraries( ${name} ${lib} )
5778 endforeach(lib)
5879 endif( LLVM_USED_LIBS )
59 if( LLVM_LINK_COMPONENTS )
60 llvm_config(${name} ${LLVM_LINK_COMPONENTS})
61 endif( LLVM_LINK_COMPONENTS )
6280 get_system_libs(llvm_system_libs)
6381 if( llvm_system_libs )
6482 target_link_libraries(${name} ${llvm_system_libs})
6684 if( LLVM_COMMON_DEPENDS )
6785 add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
6886 endif( LLVM_COMMON_DEPENDS )
87 if (LLVM_COMMON_LIBS)
88 target_link_libraries(${name} ${LLVM_COMMON_LIBS})
89 endif()
6990 endmacro(add_llvm_executable name)
7091
7192
106127 endif (TABLEGEN_OUTPUT)
107128 set(CURRENT_LLVM_TARGET LLVM${target_name} PARENT_SCOPE)
108129 endmacro(add_llvm_target)
130
131 macro(llvm_get_target_libraries return_var)
132 set( link_components ${ARGN} )
133 foreach(c ${link_components})
134 # add codegen, asmprinter, asmparser, disassembler
135 list(FIND LLVM_TARGETS_TO_BUILD ${c} idx)
136 if( NOT idx LESS 0 )
137 list(FIND llvm_libs "LLVM${c}CodeGen" idx)
138 if( NOT idx LESS 0 )
139 list(APPEND expanded_components "LLVM${c}CodeGen")
140 else()
141 list(FIND llvm_libs "LLVM${c}" idx)
142 if( NOT idx LESS 0 )
143 list(APPEND expanded_components "LLVM${c}")
144 else()
145 message(FATAL_ERROR "Target ${c} is not in the set of libraries.")
146 endif()
147 endif()
148 list(FIND llvm_libs "LLVM${c}AsmPrinter" asmidx)
149 if( NOT asmidx LESS 0 )
150 list(APPEND expanded_components "LLVM${c}AsmPrinter")
151 endif()
152 list(FIND llvm_libs "LLVM${c}AsmParser" asmidx)
153 if( NOT asmidx LESS 0 )
154 list(APPEND expanded_components "LLVM${c}AsmParser")
155 endif()
156 list(FIND llvm_libs "LLVM${c}Info" asmidx)
157 if( NOT asmidx LESS 0 )
158 list(APPEND expanded_components "LLVM${c}Info")
159 endif()
160 list(FIND llvm_libs "LLVM${c}Disassembler" asmidx)
161 if( NOT asmidx LESS 0 )
162 list(APPEND expanded_components "LLVM${c}Disassembler")
163 endif()
164 elseif( c STREQUAL "native" )
165 list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
166 elseif( c STREQUAL "nativecodegen" )
167 list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
168 elseif( c STREQUAL "backend" )
169 # same case as in `native'.
170 elseif( c STREQUAL "engine" OR c STREQUAL "jit")
171 # TODO: as we assume we are on X86, this is `jit'.
172 list(APPEND expanded_components "LLVMJIT")
173 elseif( c STREQUAL "interpreter" )
174 list(APPEND expanded_components "LLVMInterpreter")
175 elseif( c STREQUAL "all" )
176 list(APPEND expanded_components ${llvm_libs})
177 else( NOT idx LESS 0 )
178 list(APPEND expanded_components LLVM${c})
179 endif( NOT idx LESS 0 )
180 endforeach(c)
181 set(${return_var} ${expanded_components})
182 endmacro(llvm_get_target_libraries)
183
184 macro(add_llvm_link_components target_name)
185 llvm_get_target_libraries(target_libs ${ARGN})
186 target_link_libraries(${target_name} ${target_libs})
187 endmacro()
None set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/cmake")
0 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)
17
28 configure_file(
3 LLVM.cmake
4 ${llvm_cmake_builddir}/LLVM.cmake
5 @ONLY)
9 LLVMConfig.cmake.in
10 ${LLVM_BINARY_DIR}/cmake/modules/LLVMConfig.cmake
11 @ONLY
12 )
613
714 install(FILES
8 ${llvm_cmake_builddir}/LLVM.cmake
9 LLVMConfig.cmake
10 LLVMLibDeps.cmake
11 DESTINATION share/llvm/cmake)
15 ${LLVM_BINARY_DIR}/cmake/modules/LLVMConfig.cmake
16 DESTINATION lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/
17 )
+0
-165
cmake/modules/LLVMConfig.cmake less more
None 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 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
-71
cmake/modules/LLVMLibDeps.cmake less more
None set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
1 set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport)
2 set(MSVC_LIB_DEPS_LLVMARMCodeGen 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)
None set(LLVM_LINK_COMPONENTS jit bitwriter nativecodegen interpreter)
1
2 add_llvm_example(BrainF
31 BrainF.cpp
42 BrainFDriver.cpp
53 )
4
5 add_llvm_link_components(BrainF jit nativecodegen interpreter)
6 target_link_libraries(BrainF LLVMBitWriter)
None set(LLVM_LINK_COMPONENTS jit nativecodegen)
1
2 add_llvm_example(ExceptionDemo
31 ExceptionDemo.cpp
42 )
3
4 add_llvm_link_components(ExceptionDemo jit nativecodegen)
None set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen)
1
2 add_llvm_example(Fibonacci
31 fibonacci.cpp
42 )
3
4 add_llvm_link_components(Fibonacci jit interpreter nativecodegen)
None set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen)
1
2 add_llvm_example(HowToUseJIT
31 HowToUseJIT.cpp
42 )
3
4 add_llvm_link_components(HowToUseJIT jit interpreter nativecodegen)
None set(LLVM_LINK_COMPONENTS core)
1
2 add_llvm_example(Kaleidoscope-Ch3
31 toy.cpp
42 )
3
4 target_link_libraries(Kaleidoscope-Ch3 LLVMCore)
None set(LLVM_LINK_COMPONENTS core jit interpreter native)
1
2 add_llvm_example(Kaleidoscope-Ch4
31 toy.cpp
42 )
3
4 add_llvm_link_components(Kaleidoscope-Ch4 jit interpreter native)
5 target_link_libraries(Kaleidoscope-Ch4 LLVMCore)
None set(LLVM_LINK_COMPONENTS core jit interpreter native)
1
2 add_llvm_example(Kaleidoscope-Ch5
31 toy.cpp
42 )
3
4 add_llvm_link_components(Kaleidoscope-Ch5 jit interpreter native)
5 target_link_libraries(Kaleidoscope-Ch5 LLVMCore)
None set(LLVM_LINK_COMPONENTS core jit interpreter native)
1
2 add_llvm_example(Kaleidoscope-Ch6
31 toy.cpp
42 )
3
4 add_llvm_link_components(Kaleidoscope-Ch6 jit interpreter native)
5 target_link_libraries(Kaleidoscope-Ch6 LLVMCore)
None set(LLVM_LINK_COMPONENTS core jit interpreter native)
1
2 add_llvm_example(Kaleidoscope-Ch7
31 toy.cpp
42 )
3
4 add_llvm_link_components(Kaleidoscope-Ch7 jit interpreter native)
5 target_link_libraries(Kaleidoscope-Ch7 LLVMCore)
None set(LLVM_LINK_COMPONENTS bitwriter)
1
2 add_llvm_example(ModuleMaker
31 ModuleMaker.cpp
42 )
3
4 target_link_libraries(ModuleMaker LLVMBitWriter LLVMCore)
None set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen)
1
2 add_llvm_example(ParallelJIT
31 ParallelJIT.cpp
42 )
53
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 LLVMSupport)
52 target_link_libraries(LLVMAnalysis LLVMCore LLVMTarget)
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 LLVMMCParser)
10 target_link_libraries (LLVMAsmPrinter
11 LLVMAnalysis
12 LLVMCodeGen
13 LLVMCore
14 LLVMMC
15 LLVMMCParser
16 LLVMTarget
17 )
8282 VirtRegRewriter.cpp
8383 )
8484
85 target_link_libraries (LLVMCodeGen LLVMCore LLVMScalarOpts)
85 target_link_libraries (LLVMCodeGen
86 LLVMAnalysis
87 LLVMCore
88 LLVMMC
89 LLVMScalarOpts
90 LLVMTarget
91 LLVMTransformUtils
92 )
2121 TargetSelectionDAGInfo.cpp
2222 )
2323
24 target_link_libraries (LLVMSelectionDAG LLVMAnalysis LLVMAsmPrinter LLVMCodeGen)
24 target_link_libraries(LLVMSelectionDAG
25 LLVMAnalysis
26 LLVMCodeGen
27 LLVMCore
28 LLVMMC
29 LLVMTarget
30 )
None set(LLVM_LINK_COMPONENTS support system)
1 set(LLVM_REQUIRES_EH 1)
21
32 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 )
None
1 add_llvm_library(LLVMMCDisassembler
21 EDDisassembler.cpp
32 EDOperand.cpp
43 EDInst.cpp
54 EDToken.cpp
65 )
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
56 add_dependencies(LLVMARMAsmPrinter ARMCodeGenTable_gen)
7 target_link_libraries(LLVMARMAsmPrinter LLVMMC)
4646 Thumb2SizeReduction.cpp
4747 )
4848
49 target_link_libraries (LLVMARMCodeGen LLVMARMAsmPrinter LLVMSelectionDAG)
49 target_link_libraries (LLVMARMCodeGen
50 LLVMARMInfo
51 LLVMAnalysis
52 LLVMAsmPrinter
53 LLVMCodeGen
54 LLVMCore
55 LLVMMC
56 LLVMSelectionDAG
57 LLVMTarget
58 )
1212 TargetRegisterInfo.cpp
1313 TargetSubtarget.cpp
1414 )
15
16 target_link_libraries(LLVMTarget LLVMCore LLVMMC)
33 X86AsmLexer.cpp
44 X86AsmParser.cpp
55 )
6
67 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
78 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
51 target_link_libraries(LLVMX86CodeGen
52 LLVMAnalysis
53 LLVMAsmPrinter
54 LLVMCodeGen
55 LLVMCore
56 LLVMMC
57 LLVMSelectionDAG
58 LLVMTarget
59 LLVMX86AsmPrinter
60 LLVMX86Info
61 )
1010 PROPERTY COMPILE_FLAGS "/Od"
1111 )
1212 endif()
13
1314 add_dependencies(LLVMX86Disassembler X86CodeGenTable_gen)
15 target_link_libraries(LLVMX86Disassembler LLVMMC LLVMX86Info)
2323 StructRetPromotion.cpp
2424 )
2525
26 target_link_libraries (LLVMipo LLVMScalarOpts LLVMInstCombine)
26 target_link_libraries(LLVMipo
27 LLVMAnalysis
28 LLVMCore
29 LLVMScalarOpts
30 LLVMTarget
31 LLVMTransformUtils
32 LLVMipa
33 )
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 LLVMTransformUtils)
16 target_link_libraries(LLVMInstCombine
17 LLVMAnalysis
18 LLVMCore
19 LLVMTarget
20 LLVMTransformUtils
21 )
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 LLVMTransformUtils)
34 target_link_libraries (LLVMScalarOpts
35 LLVMAnalysis
36 LLVMCore
37 LLVMInstCombine
38 LLVMTarget
39 LLVMTransformUtils
40 )
2424 ValueMapper.cpp
2525 )
2626
27 target_link_libraries (LLVMTransformUtils LLVMSupport)
27 target_link_libraries(LLVMTransformUtils
28 LLVMAnalysis
29 LLVMCore
30 LLVMTarget
31 LLVMipa
32 )
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()
123
134 add_subdirectory(opt)
145 add_subdirectory(llvm-as)
3728
3829 if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
3930 add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/clang )
40 endif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
41
42 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
31 endif()
None set(LLVM_LINK_COMPONENTS asmparser instrumentation scalaropts ipo
1 linker bitreader bitwriter)
2
3 add_llvm_tool(bugpoint
41 BugDriver.cpp
52 CrashDebugger.cpp
118 ToolRunner.cpp
129 bugpoint.cpp
1310 )
11
12 target_link_libraries(bugpoint
13 LLVMAsmParser
14 LLVMInstrumentation
15 LLVMScalarOpts
16 LLVMipo
17 LLVMLinker
18 LLVMBitReader
19 LLVMBitWriter
20 )
None set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} bitreader asmparser)
1
2 add_llvm_tool(llc
31 llc.cpp
42 )
3
4 add_llvm_link_components(llc all)
5 target_link_libraries(llc LLVMBitReader LLVMAsmParser)
None set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen bitreader selectiondag)
1
2 add_llvm_tool(lli
31 lli.cpp
42 )
3
4 add_llvm_link_components(lli jit interpreter nativecodegen)
5 target_link_libraries(lli LLVMBitReader LLVMSelectionDAG)
None set(LLVM_LINK_COMPONENTS archive)
1 set(LLVM_REQUIRES_EH 1)
21
32 add_llvm_tool(llvm-ar
43 llvm-ar.cpp
54 )
65
6 target_link_libraries(llvm-ar LLVMArchive)
7
78 # TODO: Support check-local.
None set(LLVM_LINK_COMPONENTS asmparser bitwriter)
1 set(LLVM_REQUIRES_EH 1)
21
32 add_llvm_tool(llvm-as
43 llvm-as.cpp
54 )
5
6 target_link_libraries(llvm-as LLVMAsmParser LLVMBitWriter)
None set(LLVM_LINK_COMPONENTS bitreader)
1 set(LLVM_REQUIRES_EH 1)
21
32 add_llvm_tool(llvm-bcanalyzer
43 llvm-bcanalyzer.cpp
54 )
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:
116112 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} llvm-config.target)
117113
118114 install(FILES ${LLVM_CONFIG}
121117 DESTINATION bin)
122118
123119
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
145120 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
None set(LLVM_LINK_COMPONENTS support asmparser bitreader)
1
2 add_llvm_tool(llvm-diff
31 llvm-diff.cpp
42 DifferenceEngine.cpp
53 )
4
5 target_link_libraries(llvm-diff LLVMAsmParser LLVMBitReader)
None set(LLVM_LINK_COMPONENTS bitreader)
1 set(LLVM_REQUIRES_EH 1)
21
32 add_llvm_tool(llvm-dis
43 llvm-dis.cpp
54 )
5
6 target_link_libraries(llvm-dis LLVMCore LLVMBitReader)
None set(LLVM_LINK_COMPONENTS asmparser ipo bitreader bitwriter)
1
2 add_llvm_tool(llvm-extract
31 llvm-extract.cpp
42 )
3
4 target_link_libraries(llvm-extract
5 LLVMAsmParser
6 LLVMipo
7 LLVMBitReader
8 LLVMBitWriter
9 )
None set(LLVM_LINK_COMPONENTS ipo scalaropts linker archive bitwriter)
1
2 add_llvm_tool(llvm-ld
31 Optimize.cpp
42 llvm-ld.cpp
53 )
4
5 target_link_libraries(llvm-ld
6 LLVMipo
7 LLVMScalarOpts
8 LLVMLinker
9 LLVMArchive
10 LLVMBitWriter
11 )
None set(LLVM_LINK_COMPONENTS linker bitreader bitwriter asmparser)
1
2 add_llvm_tool(llvm-link
31 llvm-link.cpp
42 )
3
4 target_link_libraries(llvm-link
5 LLVMLinker
6 LLVMBitReader
7 LLVMBitWriter
8 LLVMAsmParser
9 )
None set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} support MC MCParser MCDisassembler)
1
2 add_llvm_tool(llvm-mc
31 llvm-mc.cpp
42 Disassembler.cpp
53 )
4
5 add_llvm_link_components(llvm-mc all)
6 target_link_libraries(llvm-mc LLVMMC LLVMMCParser LLVMMCDisassembler)
None set(LLVM_LINK_COMPONENTS archive bitreader)
1
2 add_llvm_tool(llvm-nm
31 llvm-nm.cpp
42 )
3
4 target_link_libraries(llvm-nm LLVMArchive LLVMBitReader)
None set(LLVM_LINK_COMPONENTS bitreader analysis)
1
2 add_llvm_tool(llvm-prof
31 llvm-prof.cpp
42 )
3
4 target_link_libraries(llvm-prof LLVMBitReader LLVMAnalysis)
None set(LLVM_LINK_COMPONENTS archive)
1 set(LLVM_REQUIRES_EH 1)
21
32 add_llvm_tool(llvm-ranlib
43 llvm-ranlib.cpp
54 )
5
6 target_link_libraries(llvm-ranlib LLVMArchive)
None set(LLVM_LINK_COMPONENTS bitreader asmparser bitwriter instrumentation scalaropts ipo)
1
2 add_llvm_tool(opt
31 AnalysisWrappers.cpp
42 GraphPrinters.cpp
53 PrintSCC.cpp
64 opt.cpp
75 )
6
7 target_link_libraries(opt
8 LLVMBitReader
9 LLVMAsmParser
10 LLVMBitWriter
11 LLVMInstrumentation
12 LLVMScalarOpts
13 LLVMipo
14 )