forked from OSchip/llvm-project
[DebugInfod] Prefix debuginfod cache directory
This prevents the debuginfod client from dumping files directly into the default cache directory (e.g., ~/.cache). Instead, these files are placed in a subdirectory (e.g., ~/.cache/llvm-debuginfod/client). Behavior is unaffected if the cache directory is provided by the DEBUGINFO_CACHE_PATH environment variable. Patch By: mysterymath Differential Revision: https://reviews.llvm.org/D117619
This commit is contained in:
parent
f2dac557f5
commit
fd0782a37b
|
@ -52,6 +52,7 @@ Expected<std::string> getDefaultDebuginfodCacheDirectory() {
|
||||||
if (!sys::path::cache_directory(CacheDirectory))
|
if (!sys::path::cache_directory(CacheDirectory))
|
||||||
return createStringError(
|
return createStringError(
|
||||||
errc::io_error, "Unable to determine appropriate cache directory.");
|
errc::io_error, "Unable to determine appropriate cache directory.");
|
||||||
|
sys::path::append(CacheDirectory, "llvm-debuginfod", "client");
|
||||||
return std::string(CacheDirectory);
|
return std::string(CacheDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue