mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CAS] Consolidate compile cache flags
Rename `-enable-cas` to `-compile-cache-job` to align with clang option names and promote that to a new driver only flag. Few other additions to driver flag for caching behaviors: * `-compile-cache-remarks`: now cache hit/miss remarks are guarded behind this flag * `-compile-cache-skip`: skip replaying from the cache. Useful as a debugging tool to do the compilation using CAS inputs even the output is a hit from the cache.
This commit is contained in:
@@ -1394,7 +1394,8 @@ static bool performAction(CompilerInstance &Instance,
|
||||
/// Return true if all the outputs are fetched from cache. Otherwise, return
|
||||
/// false and will not replay any output.
|
||||
static bool tryReplayCompilerResults(CompilerInstance &Instance) {
|
||||
if (!Instance.supportCaching())
|
||||
if (!Instance.supportCaching() ||
|
||||
Instance.getInvocation().getFrontendOptions().CacheSkipReplay)
|
||||
return false;
|
||||
|
||||
assert(Instance.getCompilerBaseKey() &&
|
||||
@@ -1409,7 +1410,8 @@ static bool tryReplayCompilerResults(CompilerInstance &Instance) {
|
||||
bool replayed = replayCachedCompilerOutputs(
|
||||
Instance.getObjectStore(), Instance.getActionCache(),
|
||||
*Instance.getCompilerBaseKey(), Instance.getDiags(),
|
||||
Instance.getInvocation().getFrontendOptions().InputsAndOutputs, *CDP);
|
||||
Instance.getInvocation().getFrontendOptions().InputsAndOutputs, *CDP,
|
||||
Instance.getInvocation().getFrontendOptions().EnableCachingRemarks);
|
||||
|
||||
// If we didn't replay successfully, re-start capture.
|
||||
if (!replayed)
|
||||
|
||||
Reference in New Issue
Block a user