@@ -63,6 +63,9 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
63
63
/// Does this compile support `.explicitInterfaceModuleBuild`
64
64
private let supportsExplicitInterfaceBuild : Bool
65
65
66
+ /// status of the scanner prefix mapping option supported by the frontend
67
+ private let supportsScannerPrefixMapPaths : Bool
68
+
66
69
/// Cached command-line additions for all main module compile jobs
67
70
private struct ResolvedModuleDependenciesCommandLineComponents {
68
71
let inputs : [ TypedVirtualPath ]
@@ -89,14 +92,16 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
89
92
supportsExplicitInterfaceBuild: Bool = false ,
90
93
cas: SwiftScanCAS ? = nil ,
91
94
prefixMap: [ ( AbsolutePath , AbsolutePath ) ] = [ ] ,
92
- supportsBridgingHeaderPCHCommand: Bool = false ) throws {
95
+ supportsBridgingHeaderPCHCommand: Bool = false ,
96
+ supportsScannerPrefixMapPaths: Bool = false ) throws {
93
97
self . dependencyGraph = dependencyGraph
94
98
self . toolchain = toolchain
95
99
self . integratedDriver = integratedDriver
96
100
self . mainModuleName = dependencyGraph. mainModuleName
97
101
self . reachabilityMap = try dependencyGraph. computeTransitiveClosure ( )
98
102
self . supportsExplicitInterfaceBuild = supportsExplicitInterfaceBuild
99
103
self . supportsBridgingHeaderPCHCommand = supportsBridgingHeaderPCHCommand
104
+ self . supportsScannerPrefixMapPaths = supportsScannerPrefixMapPaths
100
105
self . cas = cas
101
106
self . prefixMap = prefixMap
102
107
let mainModuleId : ModuleDependencyId = . swift( dependencyGraph. mainModuleName)
@@ -217,7 +222,7 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
217
222
// Add prefix mapping. The option is cache invariant so it can be added without affecting cache key.
218
223
for (key, value) in prefixMap {
219
224
commandLine. appendFlag ( " -cache-replay-prefix-map " )
220
- if driver . isFrontendArgSupported ( Option . scannerPrefixMapPaths ) {
225
+ if supportsScannerPrefixMapPaths {
221
226
commandLine. appendFlag ( value. pathString)
222
227
commandLine. appendFlag ( key. pathString)
223
228
} else {
@@ -283,7 +288,7 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
283
288
// Add prefix mapping. The option is cache invariant so it can be added without affecting cache key.
284
289
for (key, value) in prefixMap {
285
290
commandLine. appendFlag ( " -cache-replay-prefix-map " )
286
- if driver . isFrontendArgSupported ( Option . scannerPrefixMapPaths ) {
291
+ if supportsScannerPrefixMapPaths {
287
292
commandLine. appendFlag ( value. pathString)
288
293
commandLine. appendFlag ( key. pathString)
289
294
} else {
0 commit comments