<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I'm working through fixing all the issues, but the intention behind the patch was that it wasn't enabled by default. I haven't seen any bots failing, Can you give me your CMake command so I can reproduce your failure?<div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 18, 2016, at 4:52 PM, Eric Fiselier <<a href="mailto:eric@efcs.ca" class="">eric@efcs.ca</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">This patch broke building Clang out-of-tree for me. Exactly for the reason the commit says, CMake now errors because of a missing intrinsics_gen target.<div class="">Is this behavior expected? Is there a plan to fix this?</div><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br class=""><span style="font-size:12.8px" class="">@@ -645,9 +647,11 @@ endmacro(add_llvm_loadable_</span><wbr style="font-size:12.8px" class=""><span style="font-size:12.8px" class="">module name)</span><br style="font-size:12.8px" class=""><br style="font-size:12.8px" class=""><span style="font-size:12.8px" class=""> macro(add_llvm_executable name)<br class=""></span><span style="font-size:12.8px" class="">-  cmake_parse_arguments(ARG "DISABLE_LLVM_LINK_LLVM_DYLIB;</span><wbr style="font-size:12.8px" class=""><span style="font-size:12.8px" class="">IGNORE_EXTERNALIZE_DEBUGINFO;</span><wbr style="font-size:12.8px" class=""><span style="font-size:12.8px" class="">NO_INSTALL_RPATH" "" "" ${ARGN})<br class=""></span><span style="font-size:12.8px" class="">+  cmake_parse_arguments(ARG "DISABLE_LLVM_LINK_LLVM_DYLIB;</span><wbr style="font-size:12.8px" class=""><span style="font-size:12.8px" class="">IGNORE_EXTERNALIZE_DEBUGINFO;</span><wbr style="font-size:12.8px" class=""><span style="font-size:12.8px" class="">NO_INSTALL_RPATH" "" "DEPENDS" ${ARGN})<br class=""></span><span style="font-size:12.8px" class="">   llvm_process_sources( ALL_FILES ${ARG_UNPARSED_ARGUMENTS} )</span><br style="font-size:12.8px" class=""><span style="font-size:12.8px" class="">+  list(APPEND LLVM_COMMON_DEPENDS ${ARG_DEPENDS})</span></blockquote><div class=""> </div><div class="">FYI this is the line that causes the breakage.</div><div class=""> </div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Nov 16, 2016 at 9:36 PM, Chris Bieneman via llvm-commits <span dir="ltr" class=""><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: cbieneman<br class="">
Date: Wed Nov 16 22:36:59 2016<br class="">
New Revision: 287207<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=287207&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project?rev=287207&view=rev</a><br class="">
Log:<br class="">
[CMake] [Darwin] Add support for debugging tablegen dependencies<br class="">
<br class="">
This patch adds an option to the build system LLVM_DEPENDENCY_DEBUGGING. Over time I plan to extend this to do more complex verifications, but the initial patch causes compile errors wherever there is missing a dependency on intrinsics_gen.<br class="">
<br class="">
Because intrinsics_gen is a compile-time dependency not a link-time dependency, everything that relies on the headers generated in intrinsics_gen needs an explicit dependency.<br class="">
<br class="">
Modified:<br class="">
    llvm/trunk/CMakeLists.txt<br class="">
    llvm/trunk/cmake/modules/<wbr class="">AddLLVM.cmake<br class="">
<br class="">
Modified: llvm/trunk/CMakeLists.txt<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=287207&r1=287206&r2=287207&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project/llvm/trunk/CMakeLists.<wbr class="">txt?rev=287207&r1=287206&r2=<wbr class="">287207&view=diff</a><br class="">
==============================<wbr class="">==============================<wbr class="">==================<br class="">
--- llvm/trunk/CMakeLists.txt (original)<br class="">
+++ llvm/trunk/CMakeLists.txt Wed Nov 16 22:36:59 2016<br class="">
@@ -151,6 +151,20 @@ if(LLVM_CCACHE_BUILD)<br class="">
   endif()<br class="">
 endif()<br class="">
<br class="">
+option(LLVM_DEPENDENCY_<wbr class="">DEBUGGING "Dependency debugging mode to verify correctly expressed library dependencies (Darwin only)" OFF)<br class="">
+<br class="">
+# Some features of the LLVM build may be disallowed when dependency debugging is<br class="">
+# enabled. In particular you cannot use ccache because we want to force compile<br class="">
+# operations to always happen.<br class="">
+if(LLVM_DEPENDENCY_DEBUGGING)<br class="">
+  if(NOT CMAKE_HOST_APPLE)<br class="">
+    message(FATAL_ERROR "Dependency debugging is only currently supported on Darwin hosts.")<br class="">
+  endif()<br class="">
+  if(LLVM_CCACHE_BUILD)<br class="">
+    message(FATAL_ERROR "Cannot enable dependency debugging while using ccache.")<br class="">
+  endif()<br class="">
+endif()<br class="">
+<br class="">
 option(LLVM_BUILD_GLOBAL_ISEL "Experimental: Build GlobalISel" OFF)<br class="">
 if(LLVM_BUILD_GLOBAL_ISEL)<br class="">
   add_definitions(-DLLVM_BUILD_<wbr class="">GLOBAL_ISEL)<br class="">
<br class="">
Modified: llvm/trunk/cmake/modules/<wbr class="">AddLLVM.cmake<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=287207&r1=287206&r2=287207&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project/llvm/trunk/cmake/<wbr class="">modules/AddLLVM.cmake?rev=<wbr class="">287207&r1=287206&r2=287207&<wbr class="">view=diff</a><br class="">
==============================<wbr class="">==============================<wbr class="">==================<br class="">
--- llvm/trunk/cmake/modules/<wbr class="">AddLLVM.cmake (original)<br class="">
+++ llvm/trunk/cmake/modules/<wbr class="">AddLLVM.cmake Wed Nov 16 22:36:59 2016<br class="">
@@ -377,6 +377,8 @@ function(llvm_add_library name)<br class="">
     endif()<br class="">
   endif()<br class="">
<br class="">
+  setup_dependency_debugging(${<wbr class="">name} ${LLVM_COMMON_DEPENDS})<br class="">
+<br class="">
   # Generate objlib<br class="">
   if((ARG_SHARED AND ARG_STATIC) OR ARG_OBJECT)<br class="">
     # Generate an obj library for both targets.<br class="">
@@ -645,9 +647,11 @@ endmacro(add_llvm_loadable_<wbr class="">module name)<br class="">
<br class="">
<br class="">
 macro(add_llvm_executable name)<br class="">
-  cmake_parse_arguments(ARG "DISABLE_LLVM_LINK_LLVM_DYLIB;<wbr class="">IGNORE_EXTERNALIZE_DEBUGINFO;<wbr class="">NO_INSTALL_RPATH" "" "" ${ARGN})<br class="">
+  cmake_parse_arguments(ARG "DISABLE_LLVM_LINK_LLVM_DYLIB;<wbr class="">IGNORE_EXTERNALIZE_DEBUGINFO;<wbr class="">NO_INSTALL_RPATH" "" "DEPENDS" ${ARGN})<br class="">
   llvm_process_sources( ALL_FILES ${ARG_UNPARSED_ARGUMENTS} )<br class="">
<br class="">
+  list(APPEND LLVM_COMMON_DEPENDS ${ARG_DEPENDS})<br class="">
+<br class="">
   # Generate objlib<br class="">
   if(LLVM_ENABLE_OBJLIB)<br class="">
     # Generate an obj library for both targets.<br class="">
@@ -669,6 +673,8 @@ macro(add_llvm_executable name)<br class="">
     list(APPEND ALL_FILES "${LLVM_MAIN_SRC_DIR}/cmake/<wbr class="">dummy.cpp")<br class="">
   endif()<br class="">
<br class="">
+  setup_dependency_debugging(${<wbr class="">name} ${LLVM_COMMON_DEPENDS})<br class="">
+<br class="">
   if( EXCLUDE_FROM_ALL )<br class="">
     add_executable(${name} EXCLUDE_FROM_ALL ${ALL_FILES})<br class="">
   else()<br class="">
@@ -1377,3 +1383,19 @@ function(llvm_setup_rpath name)<br class="">
                         INSTALL_RPATH "${_install_rpath}"<br class="">
                         ${_install_name_dir})<br class="">
 endfunction()<br class="">
+<br class="">
+function(setup_dependency_<wbr class="">debugging name)<br class="">
+  if(NOT LLVM_DEPENDENCY_DEBUGGING)<br class="">
+    return()<br class="">
+  endif()<br class="">
+<br class="">
+  if("intrinsics_gen" IN_LIST ARGN)<br class="">
+    return()<br class="">
+  endif()<br class="">
+<br class="">
+  set(deny_attributes_gen "(deny file* (literal \"${LLVM_BINARY_DIR}/include/<wbr class="">llvm/IR/Attributes.gen\"))")<br class="">
+  set(deny_intrinsics_gen "(deny file* (literal \"${LLVM_BINARY_DIR}/include/<wbr class="">llvm/IR/Intrinsics.gen\"))")<br class="">
+<br class="">
+  set(sandbox_command "sandbox-exec -p '(version 1) (allow default) ${deny_attributes_gen} ${deny_intrinsics_gen}'")<br class="">
+  set_property(DIRECTORY PROPERTY RULE_LAUNCH_COMPILE ${sandbox_command})<br class="">
+endfunction()<br class="">
<br class="">
<br class="">
______________________________<wbr class="">_________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/llvm-commits</a><br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>