<div dir="ltr">I suppose there'd be no issue in trunk's modulemap as far as I investigated. Could we revert it?</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 1, 2016 at 5:42 AM Vassil Vassilev via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: vvassilev<br>
Date: Thu Jun 30 15:35:56 2016<br>
New Revision: 274270<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=274270&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=274270&view=rev</a><br>
Log:<br>
[CMake] Module builds depend on target intrinsics_gen to be built first.<br>
<br>
When compiling with modules, header A and B can be in the same module M.<br>
B depends on intrinsics_gen and A doesn't. Compiling a source file #include-ing<br>
header A, we implicitly request module M to be built. It puts header A and B in<br>
the same TU and tries to build them. Since B depends on intrinsics_gen (which<br>
might not be built yet) we run into build failures.<br>
<br>
This should fix our modules buildbot.<br>
<br>
Patch reviewed by Chris Bieneman.<br>
<br>
Modified:<br>
    llvm/trunk/CMakeLists.txt<br>
<br>
Modified: llvm/trunk/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=274270&r1=274269&r2=274270&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=274270&r1=274269&r2=274270&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/CMakeLists.txt (original)<br>
+++ llvm/trunk/CMakeLists.txt Thu Jun 30 15:35:56 2016<br>
@@ -700,6 +700,15 @@ add_subdirectory(lib/TableGen)<br>
<br>
 add_subdirectory(utils/TableGen)<br>
<br>
+# Force target to be built as soon as possible. Clang modules builds depend<br>
+# header-wise on it as they ship all headers from the umbrella folders. Building<br>
+# an entire module might include header, which depends on intrinsics_gen. This<br>
+# should be right after LLVMSupport and LLVMTableGen otherwise we introduce a<br>
+# circular dependence.<br>
+if (LLVM_ENABLE_MODULES)<br>
+  list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen)<br>
+endif(LLVM_ENABLE_MODULES)<br>
+<br>
 add_subdirectory(include/llvm)<br>
<br>
 add_subdirectory(lib)<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>