<div class="gmail_quote">[+cfe-commits now that this has a patch.]</div><div class="gmail_quote"><br></div><div class="gmail_quote">On 20 October 2011 14:59, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com">nlewycky@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div class="im">On 20 October 2011 14:55, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="gmail_quote">On Thu, Oct 20, 2011 at 2:03 PM, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



To understand why, you first need to know that we run builds on hermetic build machines.</blockquote></div><br></div><div>I'm not really sure why our build system is relevant here.</div></blockquote><div><br></div></div>

<div>
Only because there are ways to fix that problem which would still break caching in our build system. I wanted to steer us away from that.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div> This has been a problem for me many times using very mundane and ordinary build systems. If I build on machine X and then copy the binary to machine Y, it can't find the source code if it is stored in a different directory, even if the directory structure is entirely compatible.</div>



<div><br></div><div>Why can't we follow GCC's lead here, and use PWD (when on a system with such a concept) as the basis for DW_AT_comp_dir? I think what I'm missing is why doing that causes problems...</div>


</blockquote><div><br></div></div><div>Works for me. I just want agreement for what to do (flag, using PWD, whatever). I honestly don't care how it works as long as it works. I can propose a patch using PWD if you want, the plumbing through -cc1 will be the same either way.</div>

</div></blockquote><div><br></div><div>Ok, here's a patch that passes PWD through from the driver into the .bc, and it comes out in the .o files. Yay!</div><div><br></div><div>Please review!</div><div><br></div><div>
Nick</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><span class="HOEnZb"><font color="#888888">
<div>Nick</div></font></span><div class="im"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Chris's objections (which seem reasonable) are to *always* using PWD. To be clear, I'm not suggesting that. I'm suggesting that the Clang driver, which is already quite aware of the user's shell, can inspect PWD and getcwd and consult any other oracle needed to determine a valid working directory, and then pass it via an internal-only flag to the CC1 layer IFF it differs from getcwd.</div>



</blockquote></div></div><br>
</blockquote></div><br>