mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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.
19 lines
943 B
Swift
19 lines
943 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: mkdir -p %t/cas
|
|
|
|
// RUN: not %target-swift-frontend -c -cache-compile-job -cas-path %t/cas %s -o %t/test.o 2>&1 | %FileCheck %s --check-prefix=NO-CASFS
|
|
// NO-CASFS: caching is enabled without -cas-fs option
|
|
|
|
// RUN: %target-swift-frontend -c -cache-compile-job -cas-path %t/cas %s -o %t/test.o -allow-unstable-cache-key-for-testing
|
|
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-output-keys -- \
|
|
// RUN: %target-swift-frontend -c -cache-compile-job -cas-path %t/cas %s -o %t/test.o -allow-unstable-cache-key-for-testing > %t/cache_key.json
|
|
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action validate-outputs %t/cache_key.json
|
|
|
|
/// make sure validate fails if the cas is cleared.
|
|
// RUN: rm -rf %t/cas
|
|
// RUN: not %cache-tool -cas-path %t/cas -cache-tool-action validate-outputs %t/cache_key.json 2>&1 | %FileCheck %s
|
|
|
|
// CHECK: failed to find output for cache key
|
|
|
|
func testFunc() {}
|