[LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
Jordan Rose
jordan_rose at apple.com
Tue Aug 12 20:03:18 PDT 2014
On Aug 8, 2014, at 18:35 , Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
> On 25 July 2014 17:57, David Majnemer <david.majnemer at gmail.com> wrote:
>> To be clear, I don't think we need both; I'd like for us to drop one of
>> them. I just want to make sure that that the final state, post merge, works
>> well on all of our platforms. :)
>
> Cool. The attached patch removes TempDir. It passes all tests, but the
> OS X case looks a bit suspicious. I first implemented it by given
> priority to confstr, but we depend on the env variables taking
> priority for testing the crash report. Is there some way to change
> what confstr returns?
>
> Should we just add a -cc1 command line option for use in
> test/Driver/crash-report.c?
Thanks for doing this, Rafael!
It looks like OS X always has TMPDIR set these days (to the value of _CS_DARWIN_USER_TEMP_DIR), so I think we should just go with TMPDIR if it's set and non-empty, and then fall back to confstr. However, we should not be using TMPDIR if ErasedOnReboot is false (i.e. if we'd prefer _CS_DARWIN_USER_CACHE_DIR). Unfortunately there's no canonical environment variable for that.
CCing Greg to see if that makes sense.
Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140812/3c585a91/attachment.html>
More information about the llvm-dev
mailing list