Skip to content

Commit 68bd331

Browse files
committed
PrebuiltModuleGen: allow retrying after hitting bad file descriptor error
1 parent c348d5a commit 68bd331

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Sources/SwiftDriver/Jobs/PrebuiltModulesJob.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ extension Driver {
267267
commandLine.append(.path(try VirtualPath(path: mcp)))
268268
}
269269
commandLine.appendFlag(.serializeParseableModuleInterfaceDependencyHashes)
270+
commandLine.appendFlag(.badFileDescriptorRetryCount)
271+
commandLine.appendFlag("30")
270272
return Job(
271273
moduleName: moduleName,
272274
kind: .compile,

Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
893893
XCTAssertTrue(jobs.allSatisfy {$0.kind == .compile})
894894
XCTAssertTrue(jobs.allSatisfy {$0.commandLine.contains(.flag("-compile-module-from-interface"))})
895895
XCTAssertTrue(jobs.allSatisfy {$0.commandLine.contains(.flag("-module-cache-path"))})
896+
XCTAssertTrue(jobs.allSatisfy {$0.commandLine.contains(.flag("-bad-file-descriptor-retry-count"))})
896897
XCTAssertTrue(try jobs.allSatisfy {$0.commandLine.contains(.path(try VirtualPath(path: moduleCachePath)))})
897898
let HJobs = jobs.filter { $0.moduleName == "H"}
898899
XCTAssertTrue(HJobs.count == 2)

0 commit comments

Comments
 (0)