         let module = openModules[idx]
         let dependencies = getSwiftDependencies(for: module)
         try forEachInputOutputPair(module) { input, output in
-          jobs.append(try generateSingleModuleBuildingJob(module,
+          jobs.append(contentsOf: try generateSingleModuleBuildingJob(module,
             prebuiltModuleDir, input, output,
-            try getOutputPaths(withName: dependencies, loadableFor: input.arch), abiDumpDir))
+            try getOutputPaths(withName: dependencies, loadableFor: input.arch), abiDumpDir, abiBaselineDir))
         }
         // For each dependency, add to the list to handle if the list doesn't
         // contain this dependency.

      inputs: dependencies,
      primaryInputs: [],
      outputs: allOutputs
    )
  }

  public mutating func generatePrebuitModuleGenerationJobs(with inputMap: [String: [PrebuiltModuleInput]],
                                                           into prebuiltModuleDir: AbsolutePath,
                                                           exhaustive: Bool,
                                                           dotGraphPath: AbsolutePath? = nil,
                                                           abiDumpDir: AbsolutePath? = nil) throws -> ([Job], [Job]) {
    assert(sdkPath != nil)
    // Run the dependency scanner and update the dependency oracle with the results
    // We only need Swift dependencies here, so we don't need to invoke gatherModuleDependencies,

      let abiPath = TypedVirtualPath(file: abiFilePath, type: .jsonABIBaseline)
      commandLine.appendPath(abiPath.file)
      allOutputs.append(abiPath)
      if let abiBaselineDir = abiBaselineDir,
         let abiJob = try generateABICheckJob(moduleName, abiBaselineDir, abiPath) {
        allJobs.append(abiJob)
      }
    }
    allJobs.append(Job(
      moduleName: moduleName,
      kind: .compile,
      tool: .absolute(try toolchain.getToolPath(.swiftCompiler)),
