           "-primary-file",
           .path(inputs[ "foo"]!.file),
           .path(inputs["main"]!.file),
-          "-target", "x86_64-apple-darwin18.7.0",
+          "-target", .flag(hostTriple.triple),
           "-enable-objc-interop",
           "-sdk",
           .path(.absolute(try toolchain.sdk.get())),


final class JobExecutorTests: XCTestCase {
  func testDarwinBasic() throws {
  #if os(macOS)
    #if arch(arm64)
      // Disabled on Apple Silicon
      // rdar://76609781
      throw XCTSkip()
    #endif

    let executor = try SwiftDriverExecutor(diagnosticsEngine: DiagnosticsEngine(),
                                           processSet: ProcessSet(),
                                           fileSystem: localFileSystem,

        primaryInputs: [],
        outputs: [.init(file: VirtualPath.relative(RelativePath("main")).intern(), type: .image)]
      )
      let delegate = JobCollectingDelegate()
      let executor = MultiJobExecutor(workload: .all([compileFoo, compileMain, link]),
                                      resolver: resolver, executorDelegate: delegate, diagnosticsEngine: DiagnosticsEngine())
