8 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis
29fd868691
[llvm/CAS] Improve layering and decouple UnifiedOnDiskCache from the builtin hash implementation (#177280) 2026-01-26 09:48:32 -08:00
Steven Wu
f7d32078e5
[CAS] Add OnDiskCASLogger to help logging/debugging CAS (#174462)
Adds a CAS logging interface to track mutations of the CAS and action
cache database files. This is designed to aid in the debugging of
data corruption and other issues with the low-level on-disk
representation.

To enable logging, set the environment variable LLVM_CAS_LOG to 1 or 2.
Level 2 includes logging of all allocations inside the index, action
cache, and datapool, which increases the overhead. The log file is
placed inside the top-level directory of the unified cache. For now it
is a human-readable textual format with one line per entry.
2026-01-16 09:48:41 -08:00
Victor Chernyakin
c438773432
[LLVM][ADT] Migrate users of make_scope_exit to CTAD (#174030)
This is a followup to #173131, which introduced the CTAD functionality.
2026-01-02 20:42:56 -08:00
Jan Svoboda
01a09e04d7
[llvm][cas] Bypass sandbox in on-disk CAS (#172763)
This PR bypasses sandbox in the on-disk CAS implementation to match the
downstream patch: https://github.com/swiftlang/llvm-project/pull/12022
This isn't strictly necessary right now, since Clang doesn't integrate
with CAS upstream, but it'll make the future integration easier.
2025-12-18 09:25:25 -08:00
Steven Wu
a38f847187
[CAS] Fix deprecation warning in getBootTime (#171168)
For some older Linux distro that still ships deprecated sysctl header,
there can be deprecation warnings when building LLVMCAS. This also
results LLVMCAS to use the deprecated sysctl function, while it is only
intended to be used on Darwin platforms.

Fix the issue by only including sysctl on Apple platforms. Also move the
platform dependent `getBootTime` code into OnDiskCommon.cpp.
2025-12-08 11:20:36 -08:00
Kazu Hirata
0028ef667a
[llvm] Remove unused local variables (NFC) (#167106)
Identified with bugprone-unused-local-non-trivial-variable.
2025-11-08 07:41:07 -08:00
Steven Wu
093f947202
[CAS] Fix wrong usage of llvm::sort() in UnifiedOnDiskCache (#166963)
Fix compare function in getAllDBDirs(). The compare function in sort
should be strictly less than operator.
2025-11-07 16:36:41 +00:00
Steven Wu
6747ea050d
[CAS] Add UnifiedOnDiskCache and OnDiskCAS (#114103)
Add a new abstraction layer UnifiedOnDiskCache that adds new functions
of disk space management and data validation that builds on top of
OnDiskGraphDB and OnDiskKeyValueDB.

Build upon UnifiedOnDiskCache, it is OnDiskCAS that implements
ObjectStore and ActionCache interface for LLVM tools to interact with
CAS storage.
2025-11-03 09:50:28 -08:00