Skip to content

Commit 8ba4292

Browse files
authored
Merge pull request #2021 from swiftlang/revert-2012-eng/PR-164524241
Revert "[-debug-module-path] Prefer the moduleOutputInfo.output path if avail…"
2 parents cede0c2 + da76883 commit 8ba4292

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ extension Driver {
112112
if isPlanJobForExplicitModule && forObject && isFrontendArgSupported(.debugModulePath),
113113
let explicitModulePlanner {
114114
let mainModule = explicitModulePlanner.dependencyGraph.mainModule
115-
let pathHandle = moduleOutputInfo.output?.outputPath ?? mainModule.modulePath.path
116-
let path = VirtualPath.lookup(pathHandle)
117-
try addPathOption(option: .debugModulePath, path: path, to: &commandLine, remap: jobNeedPathRemap)
115+
try addPathOption(option: .debugModulePath, path: VirtualPath.lookup(mainModule.modulePath.path), to: &commandLine, remap: jobNeedPathRemap)
118116
}
119117

120118
// Check if dependency scanner has put the job into direct clang cc1 mode.

Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,10 +1075,6 @@ final class ExplicitModuleBuildTests: XCTestCase {
10751075
let baseName = "testExplicitModuleVerifyInterfaceJobs"
10761076
XCTAssertTrue(matchTemporary(outputFilePath, basename: baseName, fileExtension: "o") ||
10771077
matchTemporary(outputFilePath, basename: baseName, fileExtension: "autolink"))
1078-
if outputFilePath.extension == FileType.object.rawValue && driver.isFrontendArgSupported(.debugModulePath) {
1079-
// Check that this is an absolute path pointing to the temporary directory.
1080-
XCTAssertTrue(job.commandLine.contains(subsequence: ["-debug-module-path", .path(.temporary(try RelativePath(validating: "testExplicitModuleVerifyInterfaceJobs-3.swiftmodule")))]))
1081-
}
10821078
default:
10831079
XCTFail("Unexpected module dependency build job output: \(outputFilePath)")
10841080
}

0 commit comments

Comments
 (0)