[PATCH] D82259: Deprecate error prone temporary directory APIs

2020-06-26 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki abandoned this revision. davezarzycki added a comment. Now that my core concern is addressed (moving clang's default module cache out of /tmp), I don't have the time to push for this deprecation. Sorry. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D82259: Deprecate error prone temporary directory APIs

2020-06-23 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki updated this revision to Diff 272661. davezarzycki added a comment. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Moved clang specific changes to: https://reviews.llvm.org/D82362 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D82259: Deprecate error prone temporary directory APIs

2020-06-22 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:3176 + if (llvm::sys::path::cache_directory(Result)) { +llvm::sys::path::append(Result, "clang"); +llvm::sys::path::append(Result, "ModuleCache"); I would prefer to separate this

[PATCH] D82259: Deprecate error prone temporary directory APIs

2020-06-22 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Thanks @davezarzycki! Minor nit: git-clang-format the patch please, there was at least one linter warning in the changed code. I do wonder if we can get away with the removal of the API though doing that in a follow up is pretty reasonable to me. I think that one

[PATCH] D82259: Deprecate error prone temporary directory APIs

2020-06-22 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki updated this revision to Diff 272434. davezarzycki added a comment. 1. Respect Darwin and XDG cache directories. 2. Drop atypical reverse DNS in the path. 3. Make clang more robust if the default module path cannot be determined. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D82259: Deprecate error prone temporary directory APIs

2020-06-22 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki added a comment. Sure, we can honor XDG_CACHE_DIR. Maybe as a followup, somebody can wire up Darwin's cache directory (which is retrievable via a BSD specific `confstr()` API with `_CS_DARWIN_USER_CACHE_DIR`). I'm not sure about other platforms. I'll wait for more feedback before

[PATCH] D82259: Deprecate error prone temporary directory APIs

2020-06-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D82259#2106279 , @davezarzycki wrote: > Sure, we can honor XDG_CACHE_DIR. Maybe as a followup, somebody can wire up > Darwin's cache directory (which is retrievable via a BSD specific `confstr()` > API with

[PATCH] D82259: Deprecate error prone temporary directory APIs

2020-06-21 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3177 llvm::sys::path::append(Result, "ModuleCache"); } This default path is not ideal for Linux. On Linux, if we want to put this into the home directory, we should follow

[PATCH] D82259: Deprecate error prone temporary directory APIs

2020-06-20 Thread Chris Lattner via Phabricator via cfe-commits
lattner added a comment. Hi Dave, This is doing two things - changing the behavior of clang (where it stores its module cache) and deprecating an API. I'd recommend we start by focusing on whether the first part is the right thing to do, and just remove the API if this is the only client of

[PATCH] D82259: Deprecate error prone temporary directory APIs

2020-06-20 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki created this revision. davezarzycki added reviewers: compnerd, aprantl, jakehehrlich, espindola, respindola, ilya-biryukov, pcc, sammccall. davezarzycki added a project: LLVM. Herald added subscribers: cfe-commits, hiraditya. Herald added a project: clang. Naive usage of shared