blob: 13b7f5af85a7da7afc49a4fca3194a88ac30b420 [file] [log] [blame]
Hans Wennborgfe06e812013-08-23 17:59:13 +00001add_llvm_tool_subdirectory(llvm-config)
Michael J. Spencer93c9b2e2010-09-13 23:59:48 +00002
Sebastian Popa59005b2014-03-14 04:04:14 +00003# Build polly before the tools: the tools link against polly when
4# LINK_POLLY_INTO_TOOLS is set.
5if(WITH_POLLY)
6 add_llvm_external_project(polly)
7else(WITH_POLLY)
8 list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${LLVM_MAIN_SRC_DIR}/tools/polly")
9endif(WITH_POLLY)
10
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000011add_llvm_tool_subdirectory(opt)
12add_llvm_tool_subdirectory(llvm-as)
13add_llvm_tool_subdirectory(llvm-dis)
14add_llvm_tool_subdirectory(llvm-mc)
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000015
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000016add_llvm_tool_subdirectory(llc)
17add_llvm_tool_subdirectory(llvm-ar)
18add_llvm_tool_subdirectory(llvm-nm)
19add_llvm_tool_subdirectory(llvm-size)
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000020
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000021add_llvm_tool_subdirectory(llvm-cov)
Duncan P. N. Exon Smith846a6272014-02-17 23:22:49 +000022add_llvm_tool_subdirectory(llvm-profdata)
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000023add_llvm_tool_subdirectory(llvm-link)
24add_llvm_tool_subdirectory(lli)
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000025
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000026add_llvm_tool_subdirectory(llvm-extract)
27add_llvm_tool_subdirectory(llvm-diff)
28add_llvm_tool_subdirectory(macho-dump)
29add_llvm_tool_subdirectory(llvm-objdump)
30add_llvm_tool_subdirectory(llvm-readobj)
31add_llvm_tool_subdirectory(llvm-rtdyld)
32add_llvm_tool_subdirectory(llvm-dwarfdump)
Andrew Kaylor93fe3dc2012-11-21 20:38:26 +000033if( LLVM_USE_INTEL_JITEVENTS )
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000034 add_llvm_tool_subdirectory(llvm-jitlistener)
35else()
36 ignore_llvm_tool_subdirectory(llvm-jitlistener)
Andrew Kaylor93fe3dc2012-11-21 20:38:26 +000037endif( LLVM_USE_INTEL_JITEVENTS )
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000038
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000039add_llvm_tool_subdirectory(bugpoint)
40add_llvm_tool_subdirectory(bugpoint-passes)
41add_llvm_tool_subdirectory(llvm-bcanalyzer)
42add_llvm_tool_subdirectory(llvm-stress)
43add_llvm_tool_subdirectory(llvm-mcmarkup)
Oscar Fuentese638f5d2008-10-26 00:52:09 +000044
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000045add_llvm_tool_subdirectory(llvm-symbolizer)
Alexander Potapenko8c07f552012-11-12 11:33:29 +000046
NAKAMURA Takumi07a64062013-10-23 17:56:59 +000047add_llvm_tool_subdirectory(llvm-c-test)
Anders Waldenborgb932c662013-10-23 08:10:20 +000048
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000049add_llvm_tool_subdirectory(obj2yaml)
50add_llvm_tool_subdirectory(yaml2obj)
Rafael Espindola87a02902013-04-05 02:57:22 +000051
Rafael Espindolad38f9af2013-10-02 14:04:38 +000052if( NOT CYGWIN )
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000053 add_llvm_tool_subdirectory(lto)
Peter Collingbourne4e380b02013-09-19 22:15:52 +000054 add_llvm_tool_subdirectory(llvm-lto)
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000055else()
56 ignore_llvm_tool_subdirectory(lto)
Peter Collingbourne4e380b02013-09-19 22:15:52 +000057 ignore_llvm_tool_subdirectory(llvm-lto)
Oscar Fuentesac824ee2011-03-13 03:06:59 +000058endif()
59
Chandler Carruth3f7b5812011-04-28 08:18:22 +000060if( LLVM_ENABLE_PIC )
61 # TODO: support other systems:
Rafael Espindolabd5bd892013-03-17 12:01:05 +000062 if( (CMAKE_SYSTEM_NAME STREQUAL "Linux")
63 OR (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") )
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000064 add_llvm_tool_subdirectory(gold)
65 else()
66 ignore_llvm_tool_subdirectory(gold)
Chandler Carruth3f7b5812011-04-28 08:18:22 +000067 endif()
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000068else()
69 ignore_llvm_tool_subdirectory(gold)
Chandler Carruth3f7b5812011-04-28 08:18:22 +000070endif()
71
Michael J. Spencere734f542012-04-26 19:43:35 +000072add_llvm_external_project(clang)
Andy Gibbs3ef5ed12013-06-26 08:05:08 +000073
74if( NOT LLVM_INCLUDE_TOOLS STREQUAL "bootstrap-only" )
Argyrios Kyrtzidisdba67a22013-08-27 23:27:56 +000075 add_llvm_external_project(lld)
76 add_llvm_external_project(lldb)
Sebastian Pope3cd1422014-03-10 20:47:39 +000077
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000078 # Automatically add remaining sub-directories containing a 'CMakeLists.txt'
79 # file as external projects.
80 add_llvm_implicit_external_projects()
Andy Gibbs3ef5ed12013-06-26 08:05:08 +000081endif()
Michael J. Spencer93c9b2e2010-09-13 23:59:48 +000082
83set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)