Rafael Espíndola
2014-Aug-13 14:57 UTC
[LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
> 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.OK, so I guess something like this? Cheers, Rafael -------------- next part -------------- A non-text attachment was scrubbed... Name: t.patch Type: text/x-patch Size: 7578 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140813/1a3248cf/attachment.bin>
Jordan Rose
2014-Aug-14 16:32 UTC
[LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
On Aug 13, 2014, at 7:57 , Rafael Espíndola <rafael.espindola at gmail.com> wrote:>> 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. > > OK, so I guess something like this?Well, that changes behavior on Linux; previously it did honor TMPDIR when looking for a cache directory. Is that okay? (The Windows version is also honoring TEMP in this case.) What are we using the cache dir for besides the module cache? Jordan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140814/83c1746a/attachment.html>
Rafael Espíndola
2014-Aug-14 16:47 UTC
[LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
> Well, that changes behavior on Linux; previously it did honor TMPDIR when > looking for a cache directory. Is that okay? (The Windows version is also > honoring TEMP in this case.)I *think* that is a bug fix. I don't have those env variables set on my linux machine (fedora 20), but I don't remember seeing them pointing to anything but /tmp in the past and that is even in tmpfs these days.> What are we using the cache dir for besides the module cache?Only that. There is one call in lvm and 2 in clang-tools-extra, but they both pass true to erasedOnReboot.> JordanCheers, Rafael
Apparently Analagous Threads
- [LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
- [LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
- [LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
- [LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
- [LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile