                                      "-I", swiftModuleInterfacesPath,
                                      "-experimental-explicit-module-build",
                                      main.pathString])
+
+      let jobs = try driver.planBuild()
+      // Figure out which Triples to use.
+      let dependencyGraph = driver.explicitModuleBuildHandler!.dependencyGraph
+      guard case .swift(let mainModuleSwiftDetails) = dependencyGraph.mainModule.details else {
+        XCTFail("Main module does not have Swift details field")
+        return
+      }
+      let pcmArgsCurrent = mainModuleSwiftDetails.extraPcmArgs!
+      var pcmArgs9 = ["-Xcc","-target","-Xcc","x86_64-apple-macosx10.9"]
       if driver.targetTriple.isDarwin {
         pcmArgs9.append(contentsOf: ["-Xcc", "-fapinotes-swift-version=5"])
-        pcmArgs15.append(contentsOf: ["-Xcc", "-fapinotes-swift-version=5"])
-      }
-      let jobs = try driver.planBuild()
-      let dependencyGraph = driver.explicitModuleBuildHandler!.dependencyGraph
+      }
       for job in jobs {
         XCTAssertEqual(job.outputs.count, 1)
         switch (job.outputs[0].file) {

      }
    }
  }
}

          case .relative(RelativePath("SwiftOnoneSupport.swiftmodule")):
            try checkExplicitModuleBuildJob(job: job, moduleId: .swift("SwiftOnoneSupport"),
                                            moduleDependencyGraph: dependencyGraph)
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "A", with: pcmArgsCurrent)):
            try checkExplicitModuleBuildJob(job: job, moduleId: .clang("A"),
                                            moduleDependencyGraph: dependencyGraph)
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "B", with: pcmArgsCurrent)):
            try checkExplicitModuleBuildJob(job: job, moduleId: .clang("B"),
                                            moduleDependencyGraph: dependencyGraph)
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "C", with: pcmArgsCurrent)):
            try checkExplicitModuleBuildJob(job: job, moduleId: .clang("C"),
                                            moduleDependencyGraph: dependencyGraph)
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "G", with: pcmArgsCurrent)):
            try checkExplicitModuleBuildJob(job: job, moduleId: .clang("G"),
                                            moduleDependencyGraph: dependencyGraph)
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "SwiftShims", with: pcmArgs9)):
            try checkExplicitModuleBuildJob(job: job, moduleId: .clang("SwiftShims"),
                                            moduleDependencyGraph: dependencyGraph)
          case .relative(try pcmArgsEncodedRelativeModulePath(for: "SwiftShims", with: pcmArgsCurrent)):
            try checkExplicitModuleBuildJob(job: job, moduleId: .clang("SwiftShims"),
                                            moduleDependencyGraph: dependencyGraph)
          case .temporary(RelativePath("main.o")):
