File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
Sources/SwiftDriver/Toolchains Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -289,8 +289,8 @@ public final class DarwinToolchain: Toolchain {
289
289
case watchsimulator
290
290
case appletvos
291
291
case appletvsimulator
292
- case visionos
293
- case visionsimulator
292
+ case visionos = " xros "
293
+ case visionsimulator = " xrsimulator "
294
294
case unknown
295
295
}
296
296
Original file line number Diff line number Diff line change @@ -4466,6 +4466,27 @@ final class SwiftDriverTests: XCTestCase {
4466
4466
}
4467
4467
}
4468
4468
4469
+ func testDarwinSDKToolchainName( ) throws {
4470
+ var envVars = ProcessEnv . vars
4471
+ envVars [ " SWIFT_DRIVER_LD_EXEC " ] = ld. nativePathString ( escaped: false )
4472
+
4473
+ try withTemporaryDirectory { tmpDir in
4474
+ let sdk = tmpDir. appending ( component: " XROS1.0.sdk " )
4475
+ try localFileSystem. createDirectory ( sdk, recursive: true )
4476
+ try localFileSystem. writeFileContents ( sdk. appending ( component: " SDKSettings.json " ) , bytes:
4477
+ """
4478
+ {
4479
+ " Version " : " 1.0 " ,
4480
+ " CanonicalName " : " xros1.0 "
4481
+ }
4482
+ """
4483
+ )
4484
+
4485
+ let sdkInfo = DarwinToolchain . readSDKInfo ( localFileSystem, VirtualPath . absolute ( sdk) . intern ( ) )
4486
+ XCTAssertEqual ( sdkInfo? . platformKind, . visionos)
4487
+ }
4488
+ }
4489
+
4469
4490
// Test cases ported from Driver/macabi-environment.swift
4470
4491
func testDarwinSDKVersioning( ) throws {
4471
4492
var envVars = ProcessEnv . vars
You can’t perform that action at this time.
0 commit comments