blob: 66271a9f0acf0d57b8570296dbaf4660a64be493 [file] [log] [blame]
Michael J. Spencer2670c252011-01-20 06:39:06 +00001# 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.
Oscar Fuentesa229b3c2008-09-22 01:08:49 +00004
Michael J. Spencer93c9b2e2010-09-13 23:59:48 +00005if( NOT WIN32 OR MSYS OR CYGWIN )
Daniel Dunbarab0ad4e2011-12-01 20:18:09 +00006 # We currently require 'sed' to build llvm-config, so don't try to build it
Duncan Sandsb8e6cee2011-12-01 10:50:19 +00007 # on pure Win32.
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +00008 add_llvm_tool_subdirectory(llvm-config)
9else()
10 ignore_llvm_tool_subdirectory(llvm-config)
Michael J. Spencer93c9b2e2010-09-13 23:59:48 +000011endif()
12
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000013add_llvm_tool_subdirectory(opt)
14add_llvm_tool_subdirectory(llvm-as)
15add_llvm_tool_subdirectory(llvm-dis)
16add_llvm_tool_subdirectory(llvm-mc)
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000017
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000018add_llvm_tool_subdirectory(llc)
19add_llvm_tool_subdirectory(llvm-ar)
20add_llvm_tool_subdirectory(llvm-nm)
21add_llvm_tool_subdirectory(llvm-size)
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000022
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000023add_llvm_tool_subdirectory(llvm-cov)
24add_llvm_tool_subdirectory(llvm-prof)
25add_llvm_tool_subdirectory(llvm-link)
26add_llvm_tool_subdirectory(lli)
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000027
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000028add_llvm_tool_subdirectory(llvm-extract)
29add_llvm_tool_subdirectory(llvm-diff)
30add_llvm_tool_subdirectory(macho-dump)
31add_llvm_tool_subdirectory(llvm-objdump)
32add_llvm_tool_subdirectory(llvm-readobj)
33add_llvm_tool_subdirectory(llvm-rtdyld)
34add_llvm_tool_subdirectory(llvm-dwarfdump)
Andrew Kaylor93fe3dc2012-11-21 20:38:26 +000035if( LLVM_USE_INTEL_JITEVENTS )
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000036 add_llvm_tool_subdirectory(llvm-jitlistener)
37else()
38 ignore_llvm_tool_subdirectory(llvm-jitlistener)
Andrew Kaylor93fe3dc2012-11-21 20:38:26 +000039endif( LLVM_USE_INTEL_JITEVENTS )
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000040
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000041add_llvm_tool_subdirectory(bugpoint)
42add_llvm_tool_subdirectory(bugpoint-passes)
43add_llvm_tool_subdirectory(llvm-bcanalyzer)
44add_llvm_tool_subdirectory(llvm-stress)
45add_llvm_tool_subdirectory(llvm-mcmarkup)
Oscar Fuentese638f5d2008-10-26 00:52:09 +000046
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000047add_llvm_tool_subdirectory(llvm-symbolizer)
Alexander Potapenko8c07f552012-11-12 11:33:29 +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
Oscar Fuentesac824ee2011-03-13 03:06:59 +000052if( NOT WIN32 )
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000053 add_llvm_tool_subdirectory(lto)
54else()
55 ignore_llvm_tool_subdirectory(lto)
Oscar Fuentesac824ee2011-03-13 03:06:59 +000056endif()
57
Chandler Carruth3f7b5812011-04-28 08:18:22 +000058if( LLVM_ENABLE_PIC )
59 # TODO: support other systems:
Rafael Espindolabd5bd892013-03-17 12:01:05 +000060 if( (CMAKE_SYSTEM_NAME STREQUAL "Linux")
61 OR (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") )
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000062 add_llvm_tool_subdirectory(gold)
63 else()
64 ignore_llvm_tool_subdirectory(gold)
Chandler Carruth3f7b5812011-04-28 08:18:22 +000065 endif()
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000066else()
67 ignore_llvm_tool_subdirectory(gold)
Chandler Carruth3f7b5812011-04-28 08:18:22 +000068endif()
69
Michael J. Spencere734f542012-04-26 19:43:35 +000070add_llvm_external_project(clang)
Andy Gibbs3ef5ed12013-06-26 08:05:08 +000071
72if( NOT LLVM_INCLUDE_TOOLS STREQUAL "bootstrap-only" )
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000073 # Automatically add remaining sub-directories containing a 'CMakeLists.txt'
74 # file as external projects.
75 add_llvm_implicit_external_projects()
Andy Gibbs3ef5ed12013-06-26 08:05:08 +000076endif()
Michael J. Spencer93c9b2e2010-09-13 23:59:48 +000077
78set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)