Skip to content

Commit d2551db

Browse files
committed
PrebuiltModuleGen: allow retrying after hitting bad file descriptor error
1 parent f4f3254 commit d2551db

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
@@ -270,6 +270,8 @@ extension Driver {
270270
commandLine.append(.path(try VirtualPath(path: mcp)))
271271
}
272272
commandLine.appendFlag(.serializeParseableModuleInterfaceDependencyHashes)
273+
commandLine.appendFlag(.badFileDescriptorRetryCount)
274+
commandLine.appendFlag("30")
273275
return Job(
274276
moduleName: moduleName,
275277
kind: .compile,

Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
829829
XCTAssertTrue(jobs.allSatisfy {$0.kind == .compile})
830830
XCTAssertTrue(jobs.allSatisfy {$0.commandLine.contains(.flag("-compile-module-from-interface"))})
831831
XCTAssertTrue(jobs.allSatisfy {$0.commandLine.contains(.flag("-module-cache-path"))})
832+
XCTAssertTrue(jobs.allSatisfy {$0.commandLine.contains(.flag("-bad-file-descriptor-retry-count"))})
832833
XCTAssertTrue(try jobs.allSatisfy {$0.commandLine.contains(.path(try VirtualPath(path: moduleCachePath)))})
833834
let HJobs = jobs.filter { $0.moduleName == "H"}
834835
XCTAssertTrue(HJobs.count == 3)

0 commit comments

Comments
 (0)