Skip to content

Commit 1c64fd6

Browse files
[Caching] Fix caching tests on windows hosts
For Windows host, the on-disk CAS is not yet enabled in libSwiftScan yet (due to the lack of support for Windows path in cached file system abstraction), so report caching is not supported on windows hosts.
1 parent b921b97 commit 1c64fd6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/SwiftDriver/SwiftScan/SwiftScan.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,13 +281,18 @@ internal extension swiftscan_diagnostic_severity_t {
281281
}
282282

283283
@_spi(Testing) public var supportsCaching : Bool {
284+
#if os(Windows)
285+
// Caching is currently not supported on Windows hosts.
286+
return false
287+
#else
284288
return api.swiftscan_cas_create != nil &&
285289
api.swiftscan_cas_dispose != nil &&
286290
api.swiftscan_compute_cache_key != nil &&
287291
api.swiftscan_cas_store != nil &&
288292
api.swiftscan_swift_textual_detail_get_module_cache_key != nil &&
289293
api.swiftscan_swift_binary_detail_get_module_cache_key != nil &&
290294
api.swiftscan_clang_detail_get_module_cache_key != nil
295+
#endif
291296
}
292297

293298
@_spi(Testing) public var supportsBridgingHeaderPCHCommand : Bool {

0 commit comments

Comments
 (0)