File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Sources/SwiftDriver/ExplicitModuleBuilds Expand file tree Collapse file tree 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
176176 commandLine. appendFlag ( . explicitInterfaceModuleBuild)
177177 }
178178
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+ }
182191
183192 jobs. append ( Job (
184193 moduleName: moduleId. moduleName,
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ extension Diagnostic.Message {
6363 // try resolveVersionedClangDependencies(dependencyGraph: &dependencyGraph)
6464
6565 // Set dependency modules' paths to be saved in the module cache.
66- try resolveDependencyModulePaths ( dependencyGraph: & dependencyGraph)
66+ // try resolveDependencyModulePaths(dependencyGraph: &dependencyGraph)
6767
6868 if parsedOptions. hasArgument ( . printExplicitDependencyGraph) {
6969 let outputFormat = parsedOptions. getLastArgument ( . explicitDependencyGraphFormat) ? . asSingle
You can’t perform that action at this time.
0 commit comments