<div dir="ltr"><div>This seems like an LLVM bug. I'd rather LLVM didn't look in /proc, but I can't find an alternative. In any case, we shouldn't print to stderr for a successful build. Silently falling back to std::thread::hardware_concurrency() seems fine, which is what the code does.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 10, 2017 at 12:21 PM, Miller Henry via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






<div>
<font face="Calibri" size="2"><span style="font-size:11pt">
<div> </div>
<div>Greetings, I’m the maintainer of icecream, and I’m trying to solve a bug some of my users are seeing: when using clang  4.0 their build fails because the file /proc/cpuinfo does not exist.  I’m trying to figure out what the right solution to this is. See
<a href="https://github.com/icecc/icecream/issues/176" target="_blank"><font color="#0563C1"><u>https://github.com/icecc/<wbr>icecream/issues/176</u></font></a> </div>
<div>From what we can tell this came in from: <a href="https://reviews.llvm.org/D25564" target="_blank"><font color="#0563C1"><u>https://reviews.llvm.org/<wbr>D25564</u></font></a>.  </div>
<div> </div>
<div>A summary for those who don’t want to read the above: icecream is a distributed build tool that allows you to use other networked computers to speed up your builds.  The local build machine where you run “make” ships the compiler to remote machines which
then run the compiler in a chroot (this ensures that if the remote has a different version of clang installed we do not use that).</div>
<div> </div>
<div>We see three options:</div>
<div> </div>
<div>Place an empty /proc/cpuinfo in the chroot. This seems to work and it is easy.  From what we can tell this file is only used at link time and icecream does not link on remote machines.  However if clang starts to use /proc/cpuinfo for something else (asserts
on valid contents) we are broke again.</div>
<div> </div>
<div>When building the compiler package add /proc/cpuinfo from whatever machine is building the environment.  /proc/cpuinfo may be bogus but at least it exists. This is easy to do, but it is a coincidence if the file is actually correct.</div>
<div> </div>
<div>Copy /proc/cpuinfo into the chroot on each build machine.  This is the most difficult to implement (test), and I’m not sure if it gains anything or not. Note in particular that icecream tries hard to use as many cores on the remote machines as possible
without the user of the remote machine noticing a performance problem, thus clang using /proc/cpuinfo to spawn additional threads is probably something we do not want.</div>
<div> </div>
<div>I’m leaning to the first because it is easy, but others have different opinions. After looking at all the responses I’ve concluded that so far nobody actually knows enough about what clang is doing (much less planning to do) to make a useful decision. 
Thus I’m reaching out to the clang community: what considerations are we not aware of, and is there a good reason to choose any plan?</div>
<div> </div>
</span></font>
</div>

<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>