File tree 2 files changed +13
-4
lines changed
Sources/SwiftDriver/ExplicitModuleBuilds
2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -176,9 +176,18 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
176
176
commandLine. appendFlag ( . explicitInterfaceModuleBuild)
177
177
}
178
178
179
- // Set the output path
180
- commandLine. appendFlag ( . o)
181
- commandLine. appendPath ( VirtualPath . lookup ( moduleInfo. modulePath. path) )
179
+ // FIXME: This is a temporary measure meant to be deleted once supported toolchains'
180
+ // scanners always output commands with '-o'.
181
+ //
182
+ // If the dependency scanner did not append its own "-o", add it here.
183
+ // This is temporary and is meant to handle both: the scanner that
184
+ // appends '-o' and one that doesn't, until we have a toolchain snapshot with the scanner
185
+ // that appends '-o' always.
186
+ let outputFlagIndeces = commandLine. enumerated ( ) . compactMap { $1 == . flag( " -o " ) ? $0 : nil }
187
+ if outputFlagIndeces. isEmpty {
188
+ commandLine. appendFlag ( . o)
189
+ commandLine. appendPath ( VirtualPath . lookup ( moduleInfo. modulePath. path) )
190
+ }
182
191
183
192
jobs. append ( Job (
184
193
moduleName: moduleId. moduleName,
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ extension Diagnostic.Message {
63
63
// try resolveVersionedClangDependencies(dependencyGraph: &dependencyGraph)
64
64
65
65
// Set dependency modules' paths to be saved in the module cache.
66
- try resolveDependencyModulePaths ( dependencyGraph: & dependencyGraph)
66
+ // try resolveDependencyModulePaths(dependencyGraph: &dependencyGraph)
67
67
68
68
if parsedOptions. hasArgument ( . printExplicitDependencyGraph) {
69
69
let outputFormat = parsedOptions. getLastArgument ( . explicitDependencyGraphFormat) ? . asSingle
You can’t perform that action at this time.
0 commit comments