@@ -95,13 +95,8 @@ extension DarwinToolchain {
95
95
96
96
final class JobExecutorTests : XCTestCase {
97
97
func testDarwinBasic( ) throws {
98
- #if os(macOS)
99
- #if arch(arm64)
100
- // Disabled on Apple Silicon
101
- // rdar://76609781
102
- throw XCTSkip ( )
103
- #endif
104
-
98
+ #if os(macOS)
99
+ let hostTriple = try Driver ( args: [ " swiftc " , " test.swift " ] ) . hostTriple
105
100
let executor = try SwiftDriverExecutor ( diagnosticsEngine: DiagnosticsEngine ( ) ,
106
101
processSet: ProcessSet ( ) ,
107
102
fileSystem: localFileSystem,
@@ -142,7 +137,7 @@ final class JobExecutorTests: XCTestCase {
142
137
" -primary-file " ,
143
138
. path( inputs [ " foo " ] !. file) ,
144
139
. path( inputs [ " main " ] !. file) ,
145
- " -target " , " x86_64-apple-darwin18.7.0 " ,
140
+ " -target " , . flag ( hostTriple . triple ) ,
146
141
" -enable-objc-interop " ,
147
142
" -sdk " ,
148
143
. path( . absolute( try toolchain. sdk. get ( ) ) ) ,
@@ -164,7 +159,7 @@ final class JobExecutorTests: XCTestCase {
164
159
. path( . relative( RelativePath ( " foo.swift " ) ) ) ,
165
160
" -primary-file " ,
166
161
. path( inputs [ " main " ] !. file) ,
167
- " -target " , " x86_64-apple-darwin18.7.0 " ,
162
+ " -target " , . flag ( hostTriple . triple ) ,
168
163
" -enable-objc-interop " ,
169
164
" -sdk " ,
170
165
. path( . absolute( try toolchain. sdk. get ( ) ) ) ,
@@ -185,9 +180,7 @@ final class JobExecutorTests: XCTestCase {
185
180
. path( . temporary( RelativePath ( " main.o " ) ) ) ,
186
181
. path( . absolute( try toolchain. clangRT. get ( ) ) ) ,
187
182
" -syslibroot " , . path( . absolute( try toolchain. sdk. get ( ) ) ) ,
188
- " -lobjc " , " -lSystem " , " -arch " , " x86_64 " ,
189
- " -force_load " , . path( . absolute( try toolchain. compatibility50. get ( ) ) ) ,
190
- " -force_load " , . path( . absolute( try toolchain. compatibilityDynamicReplacements. get ( ) ) ) ,
183
+ " -lobjc " , " -lSystem " , " -arch " , . flag( hostTriple. archName) ,
191
184
" -L " , . path( . absolute( try toolchain. resourcesDirectory. get ( ) ) ) ,
192
185
" -L " , . path( . absolute( try toolchain. sdkStdlib ( sdk: toolchain. sdk. get ( ) ) ) ) ,
193
186
" -rpath " , " /usr/lib/swift " , " -macosx_version_min " , " 10.14.0 " , " -no_objc_category_merging " , " -o " ,
@@ -200,7 +193,6 @@ final class JobExecutorTests: XCTestCase {
200
193
primaryInputs: [ ] ,
201
194
outputs: [ . init( file: VirtualPath . relative ( RelativePath ( " main " ) ) . intern ( ) , type: . image) ]
202
195
)
203
-
204
196
let delegate = JobCollectingDelegate ( )
205
197
let executor = MultiJobExecutor ( workload: . all( [ compileFoo, compileMain, link] ) ,
206
198
resolver: resolver, executorDelegate: delegate, diagnosticsEngine: DiagnosticsEngine ( ) )
0 commit comments