1# NOTE: The tools are organized into groups of four consisting of one large and
2# three small executables. This is done to minimize memory load in parallel
3# builds.  Please retain this ordering.
4
5add_llvm_tool_subdirectory(llvm-config)
6
7add_llvm_tool_subdirectory(opt)
8add_llvm_tool_subdirectory(llvm-as)
9add_llvm_tool_subdirectory(llvm-dis)
10add_llvm_tool_subdirectory(llvm-mc)
11
12add_llvm_tool_subdirectory(llc)
13add_llvm_tool_subdirectory(llvm-ar)
14add_llvm_tool_subdirectory(llvm-nm)
15add_llvm_tool_subdirectory(llvm-size)
16
17add_llvm_tool_subdirectory(llvm-cov)
18add_llvm_tool_subdirectory(llvm-link)
19add_llvm_tool_subdirectory(lli)
20
21add_llvm_tool_subdirectory(llvm-extract)
22add_llvm_tool_subdirectory(llvm-diff)
23add_llvm_tool_subdirectory(macho-dump)
24add_llvm_tool_subdirectory(llvm-objdump)
25add_llvm_tool_subdirectory(llvm-readobj)
26add_llvm_tool_subdirectory(llvm-rtdyld)
27add_llvm_tool_subdirectory(llvm-dwarfdump)
28if( LLVM_USE_INTEL_JITEVENTS )
29  add_llvm_tool_subdirectory(llvm-jitlistener)
30else()
31  ignore_llvm_tool_subdirectory(llvm-jitlistener)
32endif( LLVM_USE_INTEL_JITEVENTS )
33
34add_llvm_tool_subdirectory(bugpoint)
35add_llvm_tool_subdirectory(bugpoint-passes)
36add_llvm_tool_subdirectory(llvm-bcanalyzer)
37add_llvm_tool_subdirectory(llvm-stress)
38add_llvm_tool_subdirectory(llvm-mcmarkup)
39
40add_llvm_tool_subdirectory(llvm-symbolizer)
41
42add_llvm_tool_subdirectory(llvm-c-test)
43
44add_llvm_tool_subdirectory(obj2yaml)
45add_llvm_tool_subdirectory(yaml2obj)
46
47if( NOT CYGWIN )
48  add_llvm_tool_subdirectory(lto)
49  add_llvm_tool_subdirectory(llvm-lto)
50else()
51  ignore_llvm_tool_subdirectory(lto)
52  ignore_llvm_tool_subdirectory(llvm-lto)
53endif()
54
55if( LLVM_ENABLE_PIC )
56  # TODO: support other systems:
57  if( (CMAKE_SYSTEM_NAME STREQUAL "Linux")
58      OR (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") )
59    add_llvm_tool_subdirectory(gold)
60  else()
61    ignore_llvm_tool_subdirectory(gold)
62  endif()
63else()
64  ignore_llvm_tool_subdirectory(gold)
65endif()
66
67add_llvm_external_project(clang)
68
69if( NOT LLVM_INCLUDE_TOOLS STREQUAL "bootstrap-only" )
70  add_llvm_external_project(lld)
71  add_llvm_external_project(lldb)
72  add_llvm_external_project(polly)
73
74  # Automatically add remaining sub-directories containing a 'CMakeLists.txt'
75  # file as external projects.
76  add_llvm_implicit_external_projects()
77endif()
78
79set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
80