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 {
289289 case watchsimulator
290290 case appletvos
291291 case appletvsimulator
292- case visionos
293- case visionsimulator
292+ case visionos = " xros "
293+ case visionsimulator = " xrsimulator "
294294 case unknown
295295 }
296296
Original file line number Diff line number Diff line change @@ -4413,6 +4413,27 @@ final class SwiftDriverTests: XCTestCase {
44134413 }
44144414 }
44154415
4416+ func testDarwinSDKToolchainName( ) throws {
4417+ var envVars = ProcessEnv . vars
4418+ envVars [ " SWIFT_DRIVER_LD_EXEC " ] = ld. nativePathString ( escaped: false )
4419+
4420+ try withTemporaryDirectory { tmpDir in
4421+ let sdk = tmpDir. appending ( component: " XROS1.0.sdk " )
4422+ try localFileSystem. createDirectory ( sdk, recursive: true )
4423+ try localFileSystem. writeFileContents ( sdk. appending ( component: " SDKSettings.json " ) , bytes:
4424+ """
4425+ {
4426+ " Version " : " 1.0 " ,
4427+ " CanonicalName " : " xros1.0 "
4428+ }
4429+ """
4430+ )
4431+
4432+ let sdkInfo = DarwinToolchain . readSDKInfo ( localFileSystem, VirtualPath . absolute ( sdk) . intern ( ) )
4433+ XCTAssertEqual ( sdkInfo? . platformKind, . visionos)
4434+ }
4435+ }
4436+
44164437 // Test cases ported from Driver/macabi-environment.swift
44174438 func testDarwinSDKVersioning( ) throws {
44184439 var envVars = ProcessEnv . vars
You can’t perform that action at this time.
0 commit comments