<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="">Hey David:<div class=""><br class=""></div><div class="">You’re right!  It seemed obvious to me when I committed, but in retrospect it clearly isn’t :)</div><div class=""><div class=""><br class=""></div><div class="">I’ll add it here for posterity:</div><div class=""><br class=""></div><div class="">The linker is using as many threads as cores on the machine when performing a ThinLTO link. We don’t want to overcommit the machine by having many link steps running in parallel: this won’t improve build time (quite the opposite likely) and will increase memory consumption. I hesitated between 1 and 2, we can fine-tune later.</div><div class=""><br class=""></div><div class="">— </div><div class="">Mehdi</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 13, 2017, at 9:32 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">It'd be helpful to include the motivation in the commit message so that there's some context for others (now and in the future/when doing archaeology).</div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Mar 8, 2017 at 9:15 PM Mehdi Amini via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: mehdi_amini<br class="gmail_msg">
Date: Wed Mar  8 23:03:53 2017<br class="gmail_msg">
New Revision: 297359<br class="gmail_msg">
<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=297359&view=rev" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project?rev=297359&view=rev</a><br class="gmail_msg">
Log:<br class="gmail_msg">
Do not use parallel link jobs with ThinLTO on Green Dragon<br class="gmail_msg">
<br class="gmail_msg">
Modified:<br class="gmail_msg">
    zorg/trunk/zorg/jenkins/build.py<br class="gmail_msg">
<br class="gmail_msg">
Modified: zorg/trunk/zorg/jenkins/build.py<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/build.py?rev=297359&r1=297358&r2=297359&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/build.py?rev=297359&r1=297358&r2=297359&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- zorg/trunk/zorg/jenkins/build.py (original)<br class="gmail_msg">
+++ zorg/trunk/zorg/jenkins/build.py Wed Mar  8 23:03:53 2017<br class="gmail_msg">
@@ -187,7 +187,10 @@ def cmake_builder(target):<br class="gmail_msg">
     max_parallel_links = conf.max_parallel_links<br class="gmail_msg">
<br class="gmail_msg">
     if conf.lto:<br class="gmail_msg">
-        cmake_cmd += ["-DLLVM_PARALLEL_LINK_JOBS=" + str(max_link_jobs())]<br class="gmail_msg">
+        if conf.thinlto:<br class="gmail_msg">
+            cmake_cmd += ["-DLLVM_PARALLEL_LINK_JOBS=1"]<br class="gmail_msg">
+        else:<br class="gmail_msg">
+            cmake_cmd += ["-DLLVM_PARALLEL_LINK_JOBS=" + str(max_link_jobs())]<br class="gmail_msg">
         cmake_cmd += ['-DLLVM_BUILD_EXAMPLES=Off']<br class="gmail_msg">
         if not max_parallel_links:<br class="gmail_msg">
             max_parallel_links = 1<br class="gmail_msg">
@@ -374,7 +377,9 @@ def clang_builder(target):<br class="gmail_msg">
             cmake_command.extend(<br class="gmail_msg">
                 ['-DLLVM_LIT_ARGS={}'.format(' '.join(lit_flags))])<br class="gmail_msg">
<br class="gmail_msg">
-            if conf.lto:<br class="gmail_msg">
+            if conf.thinlto:<br class="gmail_msg">
+                cmake_command.extend(["-DLLVM_PARALLEL_LINK_JOBS=1"])<br class="gmail_msg">
+            elif conf.lto:<br class="gmail_msg">
                 cmake_command.extend(<br class="gmail_msg">
                     ["-DLLVM_PARALLEL_LINK_JOBS=" + str(max_link_jobs())])<br class="gmail_msg">
             else:<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
llvm-commits mailing list<br class="gmail_msg">
<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
</blockquote></div>
</div></blockquote></div><br class=""></div></div></body></html>