Skip to content

Commit 7d9e6a7

Browse files
committed
Generalize JobExecutorTests.testInputForwarding to also pass on AppleSilicon
1 parent f8641c7 commit 7d9e6a7

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

Tests/SwiftDriverTests/JobExecutorTests.swift

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,8 @@ final class JobExecutorTests: XCTestCase {
212212

213213
/// Ensure the executor is capable of forwarding its standard input to the compile job that requires it.
214214
func testInputForwarding() throws {
215-
#if os(macOS)
216-
#if arch(arm64)
217-
// Disabled on Apple Silicon
218-
// rdar://76609781
219-
throw XCTSkip()
220-
#endif
215+
#if os(macOS)
216+
let hostTriple = try Driver(args: ["swiftc", "test.swift"]).hostTriple
221217
let executor = try SwiftDriverExecutor(diagnosticsEngine: DiagnosticsEngine(),
222218
processSet: ProcessSet(),
223219
fileSystem: localFileSystem,
@@ -235,7 +231,7 @@ final class JobExecutorTests: XCTestCase {
235231
"-primary-file",
236232
// This compile job must read the input from STDIN
237233
"-",
238-
"-target", "x86_64-apple-darwin18.7.0",
234+
"-target", .flag(hostTriple.triple),
239235
"-enable-objc-interop",
240236
"-sdk",
241237
.path(.absolute(try toolchain.sdk.get())),
@@ -255,9 +251,7 @@ final class JobExecutorTests: XCTestCase {
255251
.path(.temporary(RelativePath("main.o"))),
256252
.path(.absolute(try toolchain.clangRT.get())),
257253
"-syslibroot", .path(.absolute(try toolchain.sdk.get())),
258-
"-lobjc", "-lSystem", "-arch", "x86_64",
259-
"-force_load", .path(.absolute(try toolchain.compatibility50.get())),
260-
"-force_load", .path(.absolute(try toolchain.compatibilityDynamicReplacements.get())),
254+
"-lobjc", "-lSystem", "-arch", .flag(hostTriple.archName),
261255
"-L", .path(.absolute(try toolchain.resourcesDirectory.get())),
262256
"-L", .path(.absolute(try toolchain.sdkStdlib(sdk: toolchain.sdk.get()))),
263257
"-rpath", "/usr/lib/swift", "-macosx_version_min", "10.14.0", "-no_objc_category_merging",

0 commit comments

Comments
 (0)