Hi Ether,<div><br></div><div><div class="gmail_quote">On Mon, Apr 20, 2009 at 12:39 AM, ether zhhb <span dir="ltr"><<a href="mailto:etherzhhb@gmail.com">etherzhhb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
hi,<br>
<br>
In llvm/tools/clang/lib/Driver/Driver.cpp at line 1113, the statement<br>
llvm::sys::Path P("/tmp/cc"); will create an invalid temporary path in<br>
windows, and there is a "fix me" comment too :)<br>
<br>
So we just simply replace it by "llvm::sys::Path P =<br>
llvm::sys::Path::GetTemporaryDirectory();", is that right? if so, here<br>
is the patch:</blockquote><div><br></div><div>Unfortunately, GetTemporaryDirectory does something rather different (it ends up creating a temporary directory, not just returning the place to put temporary files). The llvm::sys::Path interface needs some serious surgery in my opinion...</div>
<div><br></div><div>I committed a fix to at least use the TMPDIR environment variable. If I recall correctly, Windows uses something else (TEMP?) but may define this as well? Please let me know if:</div><div>  <a href="http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090420/015926.html">http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090420/015926.html</a></div>
<div>does or does not fix it for you.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">by the way, there is another error occur while executing clang with<br>

the message ": error: unable to execute command: program not<br>
executable".</blockquote><div><br></div><div>This is probably because it isn't finding the executable in your path, or its built in search locations. You can look at the output of "clang ... other args ... -###" to see the command it is trying to run, and the output of "clang -print-search-dirs" to see where it is looking for programs.</div>
<div><br></div><div> - Daniel</div><div><br></div></div></div>