<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Ok, give r242793 a try. Sadly it looks like one part of my refactoring just isn’t tenable.<div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 21, 2015, at 8:51 AM, Chris Bieneman <<a href="mailto:cbieneman@apple.com" class="">cbieneman@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I believe I have a fix for this. I’ll commit it shortly once I’ve tested it.<div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jul 20, 2015, at 11:07 PM, Filipe Cabecinhas <<a href="mailto:filcab@gmail.com" class="">filcab@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Chris!<div class=""><br class=""></div><div class="">I haven't been able to debug it much, but could this revision be the reason I can't do something like this? (all checkouts on the same dir, then tell cmake where to find them)</div><div class=""><br class=""></div><div class=""><div class="">cmake -G Ninja /Users/filcab/dev/llvm/llvm -DLIBCXXABI_LIBCXX_PATH=~/dev/llvm/libcxx -DLIBCXXABI_LIBCXX_INCLUDES=~/dev/llvm/libcxx/include -DCMAKE_BUILD_T</div><div class="">YPE=Release -DLLVM_TARGETS_TO_BUILD=AArch64;ARM;X86 -DLLVM_TOOL_LLDB_BUILD=NO -DLLVM_EXTERNAL_CLANG_SOURCE_DIR=/Users/filcab/dev/llvm/llvm/../clang -DLLVM_EXT</div><div class="">ERNAL_LLD_SOURCE_DIR=/Users/filcab/dev/llvm/llvm/../lld -DLLVM_EXTERNAL_LLDB_SOURCE_DIR=/Users/filcab/dev/llvm/llvm/../lldb -DLLVM_EXTERNAL_LIBCXXABI_SOURCE_D</div><div class="">IR=/Users/filcab/dev/llvm/llvm/../libcxxabi -DLLVM_EXTERNAL_LIBCXX_SOURCE_DIR=/Users/filcab/dev/llvm/llvm/../libcxx -DLLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR=/Us</div><div class="">ers/filcab/dev/llvm/llvm/../compiler-rt</div></div><div class=""><br class=""></div><div class="">CMake starts and everything looks fine, until I start getting this:</div><div class="">---------------------------------<br class=""></div><div class=""><div class="">-- Compiler-RT supported architectures: x86_64;i386</div><div class="">-- Looking for rpc/xdr.h</div><div class="">-- Looking for rpc/xdr.h - not found</div><div class="">-- Looking for tirpc/rpc/xdr.h</div><div class="">-- Looking for tirpc/rpc/xdr.h - not found</div><div class="">-- Found LibXml2: /usr/lib/libxml2.dylib (found version "2.9.0") </div><div class="">-- Clang version: 3.8.0</div><div class="">-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG</div><div class="">-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Success</div><div class="">CMake Error at /Users/filcab/dev/llvm/compiler-rt/CMakeLists.txt:44 (add_custom_target):</div><div class="">  add_custom_target cannot create target "compiler-rt" because another target</div><div class="">  with the same name already exists.  The existing target is a custom target</div><div class="">  created in source directory "/Users/filcab/dev/llvm/compiler-rt".  See</div><div class="">  documentation for policy CMP0002 for more details.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">-- Compiler-RT supported architectures: x86_64;i386</div><div class="">CMake Error at /Users/filcab/dev/llvm/compiler-rt/include/CMakeLists.txt:26 (add_custom_target):</div><div class="">  add_custom_target cannot create target "compiler-rt-headers" because</div><div class="">  another target with the same name already exists.  The existing target is a</div><div class="">  custom target created in source directory</div><div class="">  "/Users/filcab/dev/llvm/compiler-rt/include".  See documentation for policy</div><div class="">  CMP0002 for more details.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">CMake Error at /Users/filcab/dev/llvm/compiler-rt/cmake/Modules/SanitizerUtils.cmake:74 (add_custom_target):</div><div class="">  add_custom_target cannot create target "SanitizerLintCheck" because another</div><div class="">  target with the same name already exists.  The existing target is a custom</div><div class="">  target created in source directory</div><div class="">  "/Users/filcab/dev/llvm/compiler-rt/lib".  See documentation for policy</div><div class="">  CMP0002 for more details.</div><div class="">Call Stack (most recent call first):</div><div class="">  /Users/filcab/dev/llvm/compiler-rt/lib/CMakeLists.txt:5 (include)</div></div><div class="">---------------------------------</div><div class=""><br class=""></div><div class="">Also, libcxx cmake errors:</div><div class="">---------------------------------<br class=""></div><div class=""><div class="">CMake Error at /Users/filcab/dev/llvm/libcxx/lib/CMakeLists.txt:28 (add_library):</div><div class="">  add_library cannot create target "cxx" because another target with the same</div><div class="">  name already exists.  The existing target is a shared library created in</div><div class="">  source directory "/Users/filcab/dev/llvm/libcxx/lib".  See documentation</div><div class="">  for policy CMP0002 for more details.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">CMake Error at /Users/filcab/dev/llvm/libcxx/lib/CMakeLists.txt:69 (target_link_libraries):</div><div class="">  Attempt to add link library "pthread" to target "cxx" which is not built in</div><div class="">  this directory.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">CMake Error at /Users/filcab/dev/llvm/libcxx/lib/CMakeLists.txt:69 (target_link_libraries):</div><div class="">  Attempt to add link library "c" to target "cxx" which is not built in this</div><div class="">  directory.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">CMake Error at /Users/filcab/dev/llvm/libcxx/lib/CMakeLists.txt:69 (target_link_libraries):</div><div class="">  Attempt to add link library "m" to target "cxx" which is not built in this</div><div class="">  directory.</div></div><div class="">---------------------------------<br class=""></div><div class="">This goes on and on...<br class=""></div><div class=""><br class=""></div><div class="">I might be able to debug more tomorrow, but you might know what's happening.</div><div class=""><br class=""></div><div class="gmail_extra">Thanks,</div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature">  Filipe<br class=""></div></div>
<br class=""><div class="gmail_quote">On Mon, Jul 20, 2015 at 1:36 PM, Chris Bieneman <span dir="ltr" class=""><<a href="mailto:beanz@apple.com" target="_blank" class="">beanz@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: cbieneman<br class="">
Date: Mon Jul 20 15:36:06 2015<br class="">
New Revision: 242705<br class="">
<br class="">
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D242705-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=SYPkADRj9lAm8T_6DGrZGFRfdHtxhofrT1RKT6gtOA8&s=NtVDoi1g4zMRfQPGQWqvS4_-yExEds97uC8ngBAJOXY&e=" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=242705&view=rev</a><br class="">
Log:<br class="">
[CMake] Cleanup tools/CMakeLists.txt to take advantage of the auto-registration that was already partially working.<br class="">
<br class="">
Re-landing r242059 which re-landed r241621... I'm really bad at this.<br class="">
<br class="">
Summary (r242059):<br class="">
This change re-lands r241621, with an additional fix that was required to allow tool sources to live outside the llvm checkout. It also no longer renames LLVM_EXTERNAL_*_SOURCE_DIR. This change was reverted in r241663, because it renamed several variables of the format LLVM_EXTERNAL_*_* to LLVM_TOOL_*_*.<br class="">
<br class="">
Summary (r241621):<br class="">
The tools CMakeLists file already had implicit tool registration, but there were a few things off about it that needed to be altered to make it work. This change addresses all that. The changes in this patch are:<br class="">
<br class="">
* factored out canonicalizing tool names from paths to CMake variables * removed the LLVM_IMPLICIT_PROJECT_IGNORE mechanism in favor of LLVM_EXTERNAL_${nameUPPER}_BUILD which I renamed to LLVM_TOOL_${nameUPPER}_BUILD because it applies to internal and external tools<br class="">
* removed ignore_llvm_tool_subdirectory() in favor of just setting LLVM_TOOL_${nameUPPER}_BUILD to Off<br class="">
* Added create_llvm_tool_options() to resolve a bug in add_llvm_external_project() - the old LLVM_EXTERNAL_${nameUPPER}_BUILD would not work on a clean CMake directory because the option could be created after it was set in code.<br class="">
* Removed all but the minimum required calls to add_llvm_external_project from tools/CMakeLists.txt<br class="">
<br class="">
Differential Revision: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10665&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=SYPkADRj9lAm8T_6DGrZGFRfdHtxhofrT1RKT6gtOA8&s=A3Ta8s-6-pihmH_L-wMc6UX3MvR36bqU4NHgZfMixto&e=" rel="noreferrer" target="_blank" class="">http://reviews.llvm.org/D10665</a><br class="">
<br class="">
Modified:<br class="">
    llvm/trunk/cmake/modules/AddLLVM.cmake<br class="">
    llvm/trunk/tools/CMakeLists.txt<br class="">
<br class="">
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake<br class="">
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_cmake_modules_AddLLVM.cmake-3Frev-3D242705-26r1-3D242704-26r2-3D242705-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=SYPkADRj9lAm8T_6DGrZGFRfdHtxhofrT1RKT6gtOA8&s=lXOm_f-rm1cSpEvjwG3smQu30I-fbvaP8aJPH5qHXUw&e=" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=242705&r1=242704&r2=242705&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)<br class="">
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Mon Jul 20 15:36:06 2015<br class="">
@@ -676,6 +676,13 @@ macro(add_llvm_target target_name)<br class="">
   set( CURRENT_LLVM_TARGET LLVM${target_name} )<br class="">
 endmacro(add_llvm_target)<br class="">
<br class="">
+function(canonicalize_tool_name name output)<br class="">
+  string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" nameStrip ${name})<br class="">
+  string(REPLACE "-" "_" nameUNDERSCORE ${nameStrip})<br class="">
+  string(TOUPPER ${nameUNDERSCORE} nameUPPER)<br class="">
+  set(${output} "${nameUPPER}" PARENT_SCOPE)<br class="">
+endfunction(canonicalize_tool_name)<br class="">
+<br class="">
 # Add external project that may want to be built as part of llvm such as Clang,<br class="">
 # lld, and Polly. This adds two options. One for the source directory of the<br class="">
 # project, which defaults to ${CMAKE_CURRENT_SOURCE_DIR}/${name}. Another to<br class="">
@@ -686,56 +693,84 @@ macro(add_llvm_external_project name)<br class="">
   if("${add_llvm_external_dir}" STREQUAL "")<br class="">
     set(add_llvm_external_dir ${name})<br class="">
   endif()<br class="">
-  list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}")<br class="">
-  string(REPLACE "-" "_" nameUNDERSCORE ${name})<br class="">
-  string(TOUPPER ${nameUNDERSCORE} nameUPPER)<br class="">
-  #TODO: Remove this check in a few days once it has circulated through<br class="">
-  # buildbots and people's checkouts (cbieneman - July 14, 2015)<br class="">
-  if("${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}")<br class="">
-    unset(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR CACHE)<br class="">
-  endif()<br class="">
-  if(NOT LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR)<br class="">
-    set(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}")<br class="">
-  else()<br class="">
-    set(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR<br class="">
+  canonicalize_tool_name(${name} nameUPPER)<br class="">
+  if (LLVM_TOOL_${nameUPPER}_BUILD)<br class="">
+    if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}/CMakeLists.txt)<br class="">
+        add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir} ${add_llvm_external_dir})<br class="">
+        set(LLVM_TOOL_${nameUPPER}_BUILD Off)<br class="">
+    elseif(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR)<br class="">
+      set(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR<br class="">
+        "${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}"<br class="">
         CACHE PATH "Path to ${name} source directory")<br class="">
-  endif()<br class="">
-  if (EXISTS ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}/CMakeLists.txt)<br class="">
-    option(LLVM_EXTERNAL_${nameUPPER}_BUILD<br class="">
-           "Whether to build ${name} as part of LLVM" ON)<br class="">
-    if (LLVM_EXTERNAL_${nameUPPER}_BUILD)<br class="">
+      mark_as_advanced(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR)<br class="">
       add_subdirectory(${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR} ${add_llvm_external_dir})<br class="">
+      set(LLVM_TOOL_${nameUPPER}_BUILD Off)<br class="">
     endif()<br class="">
   endif()<br class="">
 endmacro(add_llvm_external_project)<br class="">
<br class="">
 macro(add_llvm_tool_subdirectory name)<br class="">
-  list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${CMAKE_CURRENT_SOURCE_DIR}/${name}")<br class="">
-  add_subdirectory(${name})<br class="">
+  add_llvm_external_project(${name})<br class="">
 endmacro(add_llvm_tool_subdirectory)<br class="">
<br class="">
-macro(ignore_llvm_tool_subdirectory name)<br class="">
-  list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${CMAKE_CURRENT_SOURCE_DIR}/${name}")<br class="">
-endmacro(ignore_llvm_tool_subdirectory)<br class="">
+function(get_project_name_from_src_var var output)<br class="">
+  string(REGEX MATCH "LLVM_EXTERNAL_(.*)_SOURCE_DIR"<br class="">
+         MACHED_TOOL "${var}")<br class="">
+  if(MACHED_TOOL)<br class="">
+    set(${output} ${CMAKE_MATCH_1} PARENT_SCOPE)<br class="">
+  else()<br class="">
+    set(${output} PARENT_SCOPE)<br class="">
+  endif()<br class="">
+endfunction()<br class="">
+<br class="">
+function(create_llvm_tool_options)<br class="">
+  file(GLOB sub-dirs "${CMAKE_CURRENT_SOURCE_DIR}/*")<br class="">
+  foreach(dir ${sub-dirs})<br class="">
+    if(IS_DIRECTORY "${dir}" AND EXISTS "${dir}/CMakeLists.txt")<br class="">
+      canonicalize_tool_name(${dir} name)<br class="">
+      option(LLVM_TOOL_${name}_BUILD<br class="">
+           "Whether to build ${name} as part of LLVM" On)<br class="">
+      mark_as_advanced(LLVM_TOOL_${name}_BUILD)<br class="">
+    endif()<br class="">
+  endforeach()<br class="">
+  get_cmake_property(variableNames VARIABLES)<br class="">
+  foreach (variableName ${variableNames})<br class="">
+    get_project_name_from_src_var(${variableName} projectName)<br class="">
+    if(projectName)<br class="">
+      option(LLVM_TOOL_${projectName}_BUILD<br class="">
+           "Whether to build ${name} as part of LLVM" On)<br class="">
+      mark_as_advanced(LLVM_TOOL_${name}_BUILD)<br class="">
+    endif()<br class="">
+  endforeach()<br class="">
+endfunction(create_llvm_tool_options)<br class="">
<br class="">
-function(add_llvm_implicit_external_projects)<br class="">
+function(add_llvm_implicit_projects)<br class="">
   set(list_of_implicit_subdirs "")<br class="">
   file(GLOB sub-dirs "${CMAKE_CURRENT_SOURCE_DIR}/*")<br class="">
   foreach(dir ${sub-dirs})<br class="">
-    if(IS_DIRECTORY "${dir}")<br class="">
-      list(FIND LLVM_IMPLICIT_PROJECT_IGNORE "${dir}" tool_subdir_ignore)<br class="">
-      if( tool_subdir_ignore EQUAL -1<br class="">
-          AND EXISTS "${dir}/CMakeLists.txt")<br class="">
+    if(IS_DIRECTORY "${dir}" AND EXISTS "${dir}/CMakeLists.txt")<br class="">
+      canonicalize_tool_name(${dir} name)<br class="">
+      if (LLVM_TOOL_${name}_BUILD)<br class="">
         get_filename_component(fn "${dir}" NAME)<br class="">
         list(APPEND list_of_implicit_subdirs "${fn}")<br class="">
       endif()<br class="">
     endif()<br class="">
   endforeach()<br class="">
<br class="">
+  get_cmake_property(variableNames VARIABLES)<br class="">
+  foreach (variableName ${variableNames})<br class="">
+    get_project_name_from_src_var(${variableName} projectName)<br class="">
+    if(projectName)<br class="">
+      string(TOLOWER ${projectName} projectName)<br class="">
+      list(APPEND list_of_implicit_subdirs ${projectName})<br class="">
+    endif()<br class="">
+  endforeach()<br class="">
+<br class="">
+  list(REMOVE_DUPLICATES list_of_implicit_subdirs)<br class="">
   foreach(external_proj ${list_of_implicit_subdirs})<br class="">
     add_llvm_external_project("${external_proj}")<br class="">
   endforeach()<br class="">
-endfunction(add_llvm_implicit_external_projects)<br class="">
+endfunction(add_llvm_implicit_projects)<br class="">
<br class="">
 # Generic support for adding a unittest.<br class="">
 function(add_unittest test_suite test_name)<br class="">
<br class="">
Modified: llvm/trunk/tools/CMakeLists.txt<br class="">
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_tools_CMakeLists.txt-3Frev-3D242705-26r1-3D242704-26r2-3D242705-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=SYPkADRj9lAm8T_6DGrZGFRfdHtxhofrT1RKT6gtOA8&s=UScrcL6rknuE7VZRHtajocybu1lJUHI32rY2-9oqfOU&e=" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/CMakeLists.txt?rev=242705&r1=242704&r2=242705&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/tools/CMakeLists.txt (original)<br class="">
+++ llvm/trunk/tools/CMakeLists.txt Mon Jul 20 15:36:06 2015<br class="">
@@ -1,85 +1,37 @@<br class="">
-add_llvm_tool_subdirectory(llvm-config)<br class="">
+# This file will recurse into all subdirectories that contain CMakeLists.txt<br class="">
+# Setting variables that match the pattern LLVM_TOOL_{NAME}_BUILD to Off will<br class="">
+# prevent traversing into a directory.<br class="">
+#<br class="">
+# The only tools that need to be explicitly added are ones that have explicit<br class="">
+# ordering requirements.<br class="">
+<br class="">
+# Iterates all the subdirectories to create CMake options to enable/disable<br class="">
+# traversing each directory.<br class="">
+create_llvm_tool_options()<br class="">
<br class="">
 # Build polly before the tools: the tools link against polly when<br class="">
 # LINK_POLLY_INTO_TOOLS is set.<br class="">
 if(WITH_POLLY)<br class="">
   add_llvm_external_project(polly)<br class="">
-else(WITH_POLLY)<br class="">
-  list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${LLVM_MAIN_SRC_DIR}/tools/polly")<br class="">
-endif(WITH_POLLY)<br class="">
-<br class="">
-if( LLVM_BUILD_LLVM_DYLIB )<br class="">
-  add_llvm_tool_subdirectory(llvm-shlib)<br class="">
 else()<br class="">
-  ignore_llvm_tool_subdirectory(llvm-shlib)<br class="">
+  set(LLVM_TOOL_POLLY_BUILD Off)<br class="">
 endif()<br class="">
<br class="">
-add_llvm_tool_subdirectory(opt)<br class="">
-add_llvm_tool_subdirectory(llvm-as)<br class="">
-add_llvm_tool_subdirectory(llvm-dis)<br class="">
-add_llvm_tool_subdirectory(llvm-mc)<br class="">
-<br class="">
-add_llvm_tool_subdirectory(llc)<br class="">
-add_llvm_tool_subdirectory(llvm-ar)<br class="">
-add_llvm_tool_subdirectory(llvm-nm)<br class="">
-add_llvm_tool_subdirectory(llvm-size)<br class="">
-<br class="">
-add_llvm_tool_subdirectory(llvm-cov)<br class="">
-add_llvm_tool_subdirectory(llvm-profdata)<br class="">
-add_llvm_tool_subdirectory(llvm-link)<br class="">
-add_llvm_tool_subdirectory(lli)<br class="">
-<br class="">
-add_llvm_tool_subdirectory(llvm-extract)<br class="">
-add_llvm_tool_subdirectory(llvm-diff)<br class="">
-add_llvm_tool_subdirectory(macho-dump)<br class="">
-add_llvm_tool_subdirectory(llvm-objdump)<br class="">
-add_llvm_tool_subdirectory(llvm-readobj)<br class="">
-add_llvm_tool_subdirectory(llvm-rtdyld)<br class="">
-add_llvm_tool_subdirectory(llvm-dwarfdump)<br class="">
-add_llvm_tool_subdirectory(dsymutil)<br class="">
-add_llvm_tool_subdirectory(llvm-cxxdump)<br class="">
-if( LLVM_USE_INTEL_JITEVENTS )<br class="">
-  add_llvm_tool_subdirectory(llvm-jitlistener)<br class="">
-else()<br class="">
-  ignore_llvm_tool_subdirectory(llvm-jitlistener)<br class="">
-endif( LLVM_USE_INTEL_JITEVENTS )<br class="">
-<br class="">
-add_llvm_tool_subdirectory(bugpoint)<br class="">
-add_llvm_tool_subdirectory(bugpoint-passes)<br class="">
-add_llvm_tool_subdirectory(llvm-bcanalyzer)<br class="">
-add_llvm_tool_subdirectory(llvm-stress)<br class="">
-add_llvm_tool_subdirectory(llvm-mcmarkup)<br class="">
-<br class="">
-add_llvm_tool_subdirectory(verify-uselistorder)<br class="">
-<br class="">
-add_llvm_tool_subdirectory(llvm-symbolizer)<br class="">
-<br class="">
-add_llvm_tool_subdirectory(llvm-c-test)<br class="">
-<br class="">
-add_llvm_tool_subdirectory(obj2yaml)<br class="">
-add_llvm_tool_subdirectory(yaml2obj)<br class="">
-<br class="">
-add_llvm_tool_subdirectory(llvm-go)<br class="">
-<br class="">
-add_llvm_tool_subdirectory(llvm-pdbdump)<br class="">
-<br class="">
-if(NOT CYGWIN AND LLVM_ENABLE_PIC)<br class="">
-  add_llvm_tool_subdirectory(lto)<br class="">
-  add_llvm_tool_subdirectory(llvm-lto)<br class="">
-else()<br class="">
-  ignore_llvm_tool_subdirectory(lto)<br class="">
-  ignore_llvm_tool_subdirectory(llvm-lto)<br class="">
+if(NOT LLVM_BUILD_LLVM_DYLIB )<br class="">
+  set(LLVM_TOOL_LLVM_SHLIB_BUILD Off)<br class="">
 endif()<br class="">
<br class="">
-add_llvm_tool_subdirectory(gold)<br class="">
+if(NOT LLVM_USE_INTEL_JITEVENTS )<br class="">
+  set(LLVM_TOOL_LLVM_JITLISTENER_BUILD Off)<br class="">
+endif()<br class="">
<br class="">
-add_llvm_external_project(clang)<br class="">
-add_llvm_external_project(llgo)<br class="">
-add_llvm_external_project(lld)<br class="">
-add_llvm_external_project(lldb)<br class="">
+if(CYGWIN OR NOT LLVM_ENABLE_PIC)<br class="">
+  set(LLVM_TOOL_LTO_BUILD Off)<br class="">
+  set(LLVM_TOOL_LLVM_LTO_BUILD Off)<br class="">
+endif()<br class="">
<br class="">
 # Automatically add remaining sub-directories containing a 'CMakeLists.txt'<br class="">
 # file as external projects.<br class="">
-add_llvm_implicit_external_projects()<br class="">
+add_llvm_implicit_projects()<br class="">
<br class="">
 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class="">
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br class="">
</blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>