<div dir="ltr">FYI, a failing build; <a href="http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc18-DA/builds/475">http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc18-DA/builds/475</a></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 11, 2015 at 5:19 PM Kuperstein, Michael M 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">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I agree it’s very slow, but it’s still a valid configuration - especially when debugging tablegen itself. :-)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Whether LLVM_OPTIMIZED_TABLEGEN should be the default is a separate question.<u></u><u></u></span></p>
<p class="MsoNormal"><a name="msg-f:1509195668862102604__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Yaron Keren [mailto:<a href="mailto:yaron.keren@gmail.com" target="_blank">yaron.keren@gmail.com</a>]
<br>
<b>Sent:</b> Tuesday, August 11, 2015 11:04<br>
<b>To:</b> Kuperstein, Michael M<br>
<b>Cc:</b> Justin Bogner; <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<b>Subject:</b> Re: [llvm] r244406 - cmake: Error on invalid CMAKE_BUILD_TYPE<u></u><u></u></span></p></div></div><div lang="EN-US" link="blue" vlink="purple"><div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal" style="line-height:115%">It errors when the build is not one of the known:<span style="font-size:9.5pt;line-height:115%">Debug|Release|RelWithDebInfo|MinSizeRel.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%"><span style="font-size:9.5pt;line-height:115%">An invalid argument is always an error and without this patch the build just goes on.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%"><span style="font-size:9.5pt;line-height:115%">For Visual C++ you don't have to specify CMAKE_BUILD_TYPE as CMAKE creates a multi solution but it still significant. Without CMAKE_BUILD_TYPE and without LLVM_OPTIMIZED_TABLEGEN,
 tablegen will be built in Debug config which is really slow. </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" dir="RTL" style="text-align:right;line-height:115%;direction:rtl">
<span dir="LTR"><u></u> <u></u></span></p>
<div>
<div>
<p class="MsoNormal" style="line-height:115%">2015-08-11 10:43 GMT+03:00 Kuperstein, Michael M via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>>:<span lang="HE" dir="RTL"><u></u><u></u></span></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal" dir="RTL" style="text-align:right;line-height:115%;direction:rtl">
<span dir="LTR">Hi Justin</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>,<br>
<br>
</span><span dir="LTR">I'm not sure erroring out makes sense when generating for Visual Studio (since the solution is always generated with all build types</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>).<br>
</span><span dir="LTR">Perhaps disable it for VS</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>?<br>
<br>
</span><span dir="LTR">Thanks</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>,<br>
  </span><span dir="LTR">Michael</span><span lang="HE"><br>
<br>
-----</span><span dir="LTR">Original Message</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>-----<br>
</span><span dir="LTR">From: llvm-commits [mailto</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>:<a href="mailto:llvm-commits-bounces@lists.llvm.org" target="_blank"><span lang="EN-US" dir="LTR">llvm-commits-bounces@lists.llvm.org</span></a><span dir="RTL"></span><span dir="RTL"></span><span dir="RTL"></span><span dir="RTL"></span>]
</span><span dir="LTR">On Behalf Of Justin Bogner via llvm-commits</span><span lang="HE"><br>
</span><span dir="LTR">Sent: Sunday, August 09, 2015 00:05</span><span lang="HE"><br>
</span><span dir="LTR">To</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>:
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank"><span lang="EN-US" dir="LTR">llvm-commits@lists.llvm.org</span></a><br>
</span><span dir="LTR">Subject: [llvm] r244406 - cmake: Error on invalid CMAKE_BUILD_TYPE</span><span lang="HE"><br>
<br>
</span><span dir="LTR">Author: bogner</span><span lang="HE"><br>
</span><span dir="LTR">Date: Sat Aug</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>  8 16:04:45 2015<br>
</span><span dir="LTR">New Revision: 244406</span><span lang="HE"><br>
<br>
</span><span dir="LTR">URL</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>:
<a href="http://llvm.org/viewvc/llvm-project?rev=244406&view=rev" target="_blank">
<span lang="EN-US" dir="LTR">http://llvm.org/viewvc/llvm-project?rev=244406</span><span dir="RTL"></span><span dir="RTL"></span><span dir="RTL"></span><span dir="RTL"></span>&<span lang="EN-US" dir="LTR">view=rev</span></a><br>
</span><span dir="LTR">Log</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>:<br>
</span><span dir="LTR">cmake: Error on invalid CMAKE_BUILD_TYPE</span><span lang="HE"><br>
<br>
</span><span dir="LTR">Apparently if you make a typo in the argument to CMAKE_BUILD_TYPE, cmake silently accepts this but doesn't apply any particular build type to your build. This means you get a build that doesn't really make any sense - it's sort of a debug
 build with asserts disabled</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>.<br>
<br>
</span><span dir="LTR">Error out instead</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>.<br>
<br>
</span><span dir="LTR">Modified</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>:<br>
    </span><span dir="LTR">llvm/trunk/CMakeLists.txt</span><span lang="HE"><br>
<br>
</span><span dir="LTR">Modified: llvm/trunk/CMakeLists.txt</span><span lang="HE"><br>
</span><span dir="LTR">URL</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>:
<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=244406&r1=244405&r2=244406&view=diff" target="_blank">
<span lang="EN-US" dir="LTR">http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=244406</span><span dir="RTL"></span><span dir="RTL"></span><span dir="RTL"></span><span dir="RTL"></span>&<span lang="EN-US" dir="LTR">r1=244405</span><span dir="RTL"></span><span dir="RTL"></span><span dir="RTL"></span><span dir="RTL"></span>&<span lang="EN-US" dir="LTR">r2=244406</span><span dir="RTL"></span><span dir="RTL"></span><span dir="RTL"></span><span dir="RTL"></span>&<span lang="EN-US" dir="LTR">view=diff</span></a><br>
==============================================================================<br>
--- </span><span dir="LTR">llvm/trunk/CMakeLists.txt (original</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>)<br>
+++ </span><span dir="LTR">llvm/trunk/CMakeLists.txt Sat Aug</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>  8 16:04:45 2015<br>
@@ -7,6 +7,11 @@ </span><span dir="LTR">if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C</span><span lang="HE"><br>
   </span><span dir="LTR">set(CMAKE_BUILD_TYPE</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span> "</span><span dir="LTR">Debug</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>")<br>
 </span><span dir="LTR">endif</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>()<br>
<br>
+</span><span dir="LTR">if (CMAKE_BUILD_TYPE AND</span><span lang="HE"><br>
+    </span><span dir="LTR">NOT CMAKE_BUILD_TYPE MATCHES</span><span lang="HE"><br>
+"^(</span><span dir="LTR">Debug|Release|RelWithDebInfo|MinSizeRel</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>)$")<br>
+  </span><span dir="LTR">message(FATAL_ERROR</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span> "</span><span dir="LTR">Invalid value for CMAKE_BUILD_TYPE</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>:<br>
+${</span><span dir="LTR">CMAKE_BUILD_TYPE</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>}")<br>
+</span><span dir="LTR">endif</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>()<br>
+<br>
 </span><span dir="LTR">if(POLICY CMP0022</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>)<br>
   </span><span dir="LTR">cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required</span><span lang="HE"><br>
 </span><span dir="LTR">endif</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>()<br>
<br>
<br>
_______________________________________________<br>
</span><span dir="LTR">llvm-commits mailing list</span><span lang="HE"><br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank"><span lang="EN-US" dir="LTR">llvm-commits@lists.llvm.org</span></a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank"><span lang="EN-US" dir="LTR">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</span></a><br>
---------------------------------------------------------------------<br>
</span><span dir="LTR">Intel Israel (74) Limited</span><span lang="HE"><br>
<br>
</span><span dir="LTR">This e-mail and any attachments may contain confidential material for</span><span lang="HE"><br>
</span><span dir="LTR">the sole use of the intended recipient(s). Any review or distribution</span><span lang="HE"><br>
</span><span dir="LTR">by others is strictly prohibited. If you are not the intended</span><span lang="HE"><br>
</span><span dir="LTR">recipient, please contact the sender and delete all copies</span><span dir="RTL"></span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span><span dir="RTL"></span>.<br>
_______________________________________________<br>
</span><span dir="LTR">llvm-commits mailing list</span><span lang="HE"><br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank"><span lang="EN-US" dir="LTR">llvm-commits@lists.llvm.org</span></a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank"><span lang="EN-US" dir="LTR">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</span></a></span><span dir="LTR"><u></u><u></u></span></p>
</blockquote>
</div>
<p class="MsoNormal" dir="RTL" style="text-align:right;line-height:115%;direction:rtl">
<span lang="HE"><u></u> <u></u></span></p>
</div>
</div>
</div></div><div lang="EN-US" link="blue" vlink="purple">
<p>---------------------------------------------------------------------<br>
Intel Israel (74) Limited</p>

<p>This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.</p></div>

_______________________________________________<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>