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