PGO: llvm-profdata: tool for merging profiles
[oota-llvm.git] / tools / CMakeLists.txt
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
5 add_llvm_tool_subdirectory(llvm-config)
6
7 add_llvm_tool_subdirectory(opt)
8 add_llvm_tool_subdirectory(llvm-as)
9 add_llvm_tool_subdirectory(llvm-dis)
10 add_llvm_tool_subdirectory(llvm-mc)
11
12 add_llvm_tool_subdirectory(llc)
13 add_llvm_tool_subdirectory(llvm-ar)
14 add_llvm_tool_subdirectory(llvm-nm)
15 add_llvm_tool_subdirectory(llvm-size)
16
17 add_llvm_tool_subdirectory(llvm-cov)
18 add_llvm_tool_subdirectory(llvm-profdata)
19 add_llvm_tool_subdirectory(llvm-link)
20 add_llvm_tool_subdirectory(lli)
21
22 add_llvm_tool_subdirectory(llvm-extract)
23 add_llvm_tool_subdirectory(llvm-diff)
24 add_llvm_tool_subdirectory(macho-dump)
25 add_llvm_tool_subdirectory(llvm-objdump)
26 add_llvm_tool_subdirectory(llvm-readobj)
27 add_llvm_tool_subdirectory(llvm-rtdyld)
28 add_llvm_tool_subdirectory(llvm-dwarfdump)
29 if( LLVM_USE_INTEL_JITEVENTS )
30   add_llvm_tool_subdirectory(llvm-jitlistener)
31 else()
32   ignore_llvm_tool_subdirectory(llvm-jitlistener)
33 endif( LLVM_USE_INTEL_JITEVENTS )
34
35 add_llvm_tool_subdirectory(bugpoint)
36 add_llvm_tool_subdirectory(bugpoint-passes)
37 add_llvm_tool_subdirectory(llvm-bcanalyzer)
38 add_llvm_tool_subdirectory(llvm-stress)
39 add_llvm_tool_subdirectory(llvm-mcmarkup)
40
41 add_llvm_tool_subdirectory(llvm-symbolizer)
42
43 add_llvm_tool_subdirectory(llvm-c-test)
44
45 add_llvm_tool_subdirectory(obj2yaml)
46 add_llvm_tool_subdirectory(yaml2obj)
47
48 if( NOT CYGWIN )
49   add_llvm_tool_subdirectory(lto)
50   add_llvm_tool_subdirectory(llvm-lto)
51 else()
52   ignore_llvm_tool_subdirectory(lto)
53   ignore_llvm_tool_subdirectory(llvm-lto)
54 endif()
55
56 if( LLVM_ENABLE_PIC )
57   # TODO: support other systems:
58   if( (CMAKE_SYSTEM_NAME STREQUAL "Linux")
59       OR (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") )
60     add_llvm_tool_subdirectory(gold)
61   else()
62     ignore_llvm_tool_subdirectory(gold)
63   endif()
64 else()
65   ignore_llvm_tool_subdirectory(gold)
66 endif()
67
68 add_llvm_external_project(clang)
69
70 if( NOT LLVM_INCLUDE_TOOLS STREQUAL "bootstrap-only" )
71   add_llvm_external_project(lld)
72   add_llvm_external_project(lldb)
73   add_llvm_external_project(polly)
74
75   # Automatically add remaining sub-directories containing a 'CMakeLists.txt'
76   # file as external projects.
77   add_llvm_implicit_external_projects()
78 endif()
79
80 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)