   XCTAssertTrue(job.commandLine.contains(.flag(String("-fno-implicit-modules"))))
   try checkExplicitModuleBuildJobDependencies(job: job, pcmArgs: downstreamPCMArgs,
                                               moduleInfo: moduleInfo,
-                                              dependencyOracle: dependencyOracle)
+                                              dependencyOracle: dependencyOracle,
+                                              pcmFileEncoder: pcmFileEncoder)
 }
 
 /// Checks that the build job for the specified module contains the required options and inputs

      if driver.targetTriple.isDarwin {
        pcmArgs9.append(contentsOf: ["-Xcc", "-fapinotes-swift-version=5"])
      }
      for job in jobs {
        XCTAssertEqual(job.outputs.count, 1)
        switch (job.outputs[0].file) {
          case .relative(RelativePath("A.swiftmodule")):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .swift("A"),
                                            dependencyOracle: dependencyOracle)
          case .relative(RelativePath("E.swiftmodule")):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .swift("E"),
                                            dependencyOracle: dependencyOracle)
          case .relative(RelativePath("G.swiftmodule")):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .swift("G"),
                                            dependencyOracle: dependencyOracle)
          case .relative(RelativePath("Swift.swiftmodule")):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .swift("Swift"),
                                            dependencyOracle: dependencyOracle)
          case .relative(RelativePath("SwiftOnoneSupport.swiftmodule")):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .swift("SwiftOnoneSupport"),
                                            dependencyOracle: dependencyOracle)
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "A", with: pcmArgsCurrent)):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .clang("A"),
                                            dependencyOracle: dependencyOracle)
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "B", with: pcmArgsCurrent)):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .clang("B"),
                                            dependencyOracle: dependencyOracle)
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "C", with: pcmArgsCurrent)):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .clang("C"),
                                            dependencyOracle: dependencyOracle)
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "G", with: pcmArgsCurrent)):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .clang("G"),
                                            dependencyOracle: dependencyOracle)
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "G", with: pcmArgs9)):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgs9, moduleId: .clang("G"),
                                            dependencyOracle: dependencyOracle)
          // Module X is a dependency from Clang module "G" discovered only via versioned PCM
          // re-scan. 
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "X", with: pcmArgsCurrent)):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .clang("X"),
                                            dependencyOracle: dependencyOracle)
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "X", with: pcmArgs9)):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgs9, moduleId: .clang("X"),
                                            dependencyOracle: dependencyOracle)
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "SwiftShims", with: pcmArgs9)):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgs9, moduleId: .clang("SwiftShims"),
                                            dependencyOracle: dependencyOracle)
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "SwiftShims", with: pcmArgsCurrent)):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .clang("SwiftShims"),
                                            dependencyOracle: dependencyOracle)
          case .temporary(RelativePath("testExplicitModuleBuildJobs.o")):
            XCTAssertTrue(driver.isExplicitMainModuleJob(job: job))
            let pcmArgs = mainModuleSwiftDetails.extraPcmArgs
            try checkExplicitModuleBuildJobDependencies(job: job, pcmArgs: pcmArgs,
                                                        moduleInfo: mainModuleInfo,
                                                        dependencyOracle: dependencyOracle)
          case .relative(RelativePath("testExplicitModuleBuildJobs")):
            XCTAssertTrue(driver.isExplicitMainModuleJob(job: job))
            XCTAssertEqual(job.kind, .link)

      if driver.targetTriple.isDarwin {
        pcmArgs9.append(contentsOf: ["-Xcc", "-fapinotes-swift-version=5"])
      }
      let pcmFileEncoder = { (moduleInfo: ModuleInfo, hashParts: [String]) -> VirtualPath in
        try! driver.explicitDependencyBuildPlanner!.targetEncodedClangModuleFilePath(for: moduleInfo,
                                                                                     hashParts: hashParts)
      }
      let pcmModuleNameEncoder = { (moduleName: String, hashParts: [String]) -> String in
        try! driver.explicitDependencyBuildPlanner!.targetEncodedClangModuleName(for: moduleName,
                                                                                 hashParts: hashParts)
      }
      for job in jobs {
        guard job.kind != .interpret else { continue }
        XCTAssertEqual(job.outputs.count, 1)
        switch (job.outputs[0].file) {
          case .relative(RelativePath("A.swiftmodule")):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .swift("A"),
                                            dependencyOracle: dependencyOracle,
                                            pcmFileEncoder: pcmFileEncoder)
          case .relative(RelativePath("Swift.swiftmodule")):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .swift("Swift"),
                                            dependencyOracle: dependencyOracle,
                                            pcmFileEncoder: pcmFileEncoder)
          case .relative(RelativePath("SwiftOnoneSupport.swiftmodule")):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .swift("SwiftOnoneSupport"),
                                            dependencyOracle: dependencyOracle,
                                            pcmFileEncoder: pcmFileEncoder)
          case .relative(pcmArgsEncodedRelativeModulePath(for: "A", with: pcmArgsCurrent,
                                                              pcmModuleNameEncoder: pcmModuleNameEncoder)):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .clang("A"),
                                            dependencyOracle: dependencyOracle,
                                            pcmFileEncoder: pcmFileEncoder)
          case .relative(pcmArgsEncodedRelativeModulePath(for: "B", with: pcmArgsCurrent,
                                                              pcmModuleNameEncoder: pcmModuleNameEncoder)):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .clang("B"),
                                            dependencyOracle: dependencyOracle,
                                            pcmFileEncoder: pcmFileEncoder)
          case .relative(pcmArgsEncodedRelativeModulePath(for: "C", with: pcmArgsCurrent,
                                                              pcmModuleNameEncoder: pcmModuleNameEncoder)):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .clang("C"),
                                            dependencyOracle: dependencyOracle,
                                            pcmFileEncoder: pcmFileEncoder)
          case .relative(pcmArgsEncodedRelativeModulePath(for: "SwiftShims", with: pcmArgs9,
                                                              pcmModuleNameEncoder: pcmModuleNameEncoder)):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgs9, moduleId: .clang("SwiftShims"),
                                            dependencyOracle: dependencyOracle,
                                            pcmFileEncoder: pcmFileEncoder)
          case .relative(pcmArgsEncodedRelativeModulePath(for: "SwiftShims", with: pcmArgsCurrent,
                                                              pcmModuleNameEncoder: pcmModuleNameEncoder)):
            try checkExplicitModuleBuildJob(job: job, pcmArgs: pcmArgsCurrent, moduleId: .clang("SwiftShims"),
                                            dependencyOracle: dependencyOracle,
                                            pcmFileEncoder: pcmFileEncoder)
          default:
            XCTFail("Unexpected module dependency build job output: \(job.outputs[0].file)")
        }
