<div class="gmail_quote">On Thu, Oct 20, 2011 at 2:03 PM, 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;">
To understand why, you first need to know that we run builds on hermetic build machines.</blockquote></div><br><div>I'm not really sure why our build system is relevant here. 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><div>
<br></div><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>