Skip to content

Commit 095cdac

Browse files
authored
Revert "[Dependency Scanning] Restore passing external target map as inputs to the scanning action."
1 parent 32ffbb7 commit 095cdac

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

Sources/SwiftDriver/ExplicitModuleBuilds/ModuleDependencyScanning.swift

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -52,37 +52,11 @@ public extension Driver {
5252
moduleDependencyGraphUse: .dependencyScan)
5353
// FIXME: MSVC runtime flags
5454

55-
// Pass in external target dependencies to be treated as placeholder dependencies by the scanner
56-
if let externalTargetPaths = externalTargetModulePathMap {
57-
let dependencyPlaceholderMapFile =
58-
try serializeExternalDependencyArtifacts(externalTargetPaths: externalTargetPaths)
59-
commandLine.appendFlag("-placeholder-dependency-module-map-file")
60-
commandLine.appendPath(dependencyPlaceholderMapFile)
61-
}
62-
6355
// Pass on the input files
6456
commandLine.append(contentsOf: inputFiles.map { .path($0.file) })
6557
return (inputs, commandLine)
6658
}
6759

68-
/// Serialize a map of placeholder (external) dependencies for the dependency scanner.
69-
private func serializeExternalDependencyArtifacts(externalTargetPaths: ExternalTargetModulePathMap)
70-
throws -> VirtualPath {
71-
var placeholderArtifacts: [SwiftModuleArtifactInfo] = []
72-
// Explicit external targets
73-
for (moduleId, binaryModulePath) in externalTargetPaths {
74-
let modPath = TextualVirtualPath(path: VirtualPath.absolute(binaryModulePath).intern())
75-
placeholderArtifacts.append(
76-
SwiftModuleArtifactInfo(name: moduleId.moduleName,
77-
modulePath: modPath))
78-
}
79-
let encoder = JSONEncoder()
80-
encoder.outputFormatting = [.prettyPrinted]
81-
let contents = try encoder.encode(placeholderArtifacts)
82-
return VirtualPath.createUniqueTemporaryFileWithKnownContents(.init("\(moduleOutputInfo.name)-external-modules.json"),
83-
contents)
84-
}
85-
8660
/// Returns false if the lib is available and ready to use
8761
private func initSwiftScanLib() throws -> Bool {
8862
// If `-nonlib-dependency-scanner` was specified or the libSwiftScan library cannot be found,

0 commit comments

Comments
 (0)