From 475874bcffd497b1fe1f3cd79a17deca9503258c Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Mon, 12 May 2025 17:29:55 -0700 Subject: [PATCH] [CAS][SwiftCompiler] We don't need to disable caching if there is a bridging header that is not precompiled With later improvements we actually force precompiling the bridging header from the driver, when caching is enabled. --- Sources/SWBCore/SpecImplementations/Tools/SwiftCompiler.swift | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Sources/SWBCore/SpecImplementations/Tools/SwiftCompiler.swift b/Sources/SWBCore/SpecImplementations/Tools/SwiftCompiler.swift index 44b2fd0f..44789631 100644 --- a/Sources/SWBCore/SpecImplementations/Tools/SwiftCompiler.swift +++ b/Sources/SWBCore/SpecImplementations/Tools/SwiftCompiler.swift @@ -1428,10 +1428,6 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi delegate.warning("swift compiler caching requires explicit module build (SWIFT_ENABLE_EXPLICIT_MODULES=YES)") return false } - if disabledPCHCompile, !cbc.scope.evaluate(BuiltinMacros.SWIFT_OBJC_BRIDGING_HEADER).isEmpty { - delegate.warning("swift compiler caching requires precompile bridging header if caching is enabled (SWIFT_PRECOMPILE_BRIDGING_HEADER=YES)") - return false - } if let specInfo = await (discoveredCommandLineToolSpecInfo(cbc.producer, cbc.scope, delegate) as? DiscoveredSwiftCompilerToolSpecInfo) { if !specInfo.hasFeature(DiscoveredSwiftCompilerToolSpecInfo.FeatureFlag.compilationCaching.rawValue) { delegate.warning("swift compiler caching is not supported by toolchain")