Skip to content

Commit da1246a

Browse files
Merge pull request #1859 from cachemeifyoucan/eng/PR-disable-pch-caching-msg
[SwiftCaching] Tweak warning for disable pch when caching is enabled
2 parents d47f564 + 8ed3e28 commit da1246a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Sources/SwiftDriver/Driver/Driver.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ public struct Driver {
314314
/// Code & data for incremental compilation. Nil if not running in incremental mode.
315315
/// Set during planning because needs the jobs to look at outputs.
316316
@_spi(Testing) public private(set) var incrementalCompilationState: IncrementalCompilationState? = nil
317-
317+
318318
/// The graph of explicit module dependencies of this module, if the driver has planned an explicit module build.
319319
public private(set) var intermoduleDependencyGraph: InterModuleDependencyGraph? = nil
320320

@@ -890,7 +890,7 @@ public struct Driver {
890890
let cwd = fileSystem.currentWorkingDirectory
891891
return try cwd.map{ try AbsolutePath(validating: workingDirectoryArg.asSingle, relativeTo: $0) } ?? AbsolutePath(validating: workingDirectoryArg.asSingle)
892892
}
893-
893+
894894
if let specifiedWorkingDir = self.workingDirectory {
895895
// Apply the working directory to the parsed options if passed explicitly.
896896
try Self.applyWorkingDirectory(specifiedWorkingDir, to: &self.parsedOptions)
@@ -987,8 +987,8 @@ public struct Driver {
987987

988988
self.lto = Self.ltoKind(&parsedOptions, diagnosticsEngine: diagnosticsEngine)
989989
// Figure out the primary outputs from the driver.
990-
(self.compilerOutputType, self.linkerOutputType) =
991-
Self.determinePrimaryOutputs(&parsedOptions, targetTriple: self.frontendTargetInfo.target.triple,
990+
(self.compilerOutputType, self.linkerOutputType) =
991+
Self.determinePrimaryOutputs(&parsedOptions, targetTriple: self.frontendTargetInfo.target.triple,
992992
driverKind: driverKind, diagnosticsEngine: diagnosticEngine)
993993

994994
// Multithreading.
@@ -1121,7 +1121,7 @@ public struct Driver {
11211121
}
11221122
var maybeNeedPCH = parsedOptions.hasFlag(positive: .enableBridgingPch, negative: .disableBridgingPch, default: true)
11231123
if enableCaching && !maybeNeedPCH {
1124-
diagnosticsEngine.emit(.warning("-cache-compile-job cannot be used with -disable-bridging-pch, turn on PCH generation"),
1124+
diagnosticsEngine.emit(.warning("-disable-bridging-pch is ignored because compilation caching (-cache-compile-job) is used"),
11251125
location: nil)
11261126
maybeNeedPCH = true
11271127
}
@@ -1980,12 +1980,12 @@ extension Driver {
19801980
guard let buildRecordInfo = self.buildRecordInfo, let incrementalCompilationState = self.incrementalCompilationState else {
19811981
return
19821982
}
1983-
1983+
19841984
let buildRecord = buildRecordInfo.buildRecord(
19851985
jobs, self.incrementalCompilationState?.blockingConcurrentMutationToProtectedState{
19861986
$0.skippedCompilationInputs
19871987
})
1988-
1988+
19891989
do {
19901990
try incrementalCompilationState.writeDependencyGraph(to: buildRecordInfo.dependencyGraphPath, buildRecord)
19911991
} catch {

0 commit comments

Comments
 (0)