@@ -16,15 +16,8 @@ def getOSName(os):
1616 if os == 'watchos' : return 'watchOS'
1717 return os
1818
19- def getArch (os ):
20- if os == 'macosx' : return 'x86_64'
21- if os == 'ios' : return 'arm64'
22- if os == 'tvos' : return 'arm64'
23- if os == 'watchos' : return 'armv7k'
24- return os
25-
26- def getTriple (os , version ):
27- return getArch (os ) + '-apple-' + os + version
19+ def getTriple (os , arch , version ):
20+ return f"{ arch } -apple-{ os } { version } "
2821
2922def getOlderVersion (major , minor ):
3023 if minor != 0 :
@@ -43,6 +36,7 @@ def setUp(self):
4336 @skipIf (oslist = ['linux' , 'windows' ])
4437 def testAvailability (self ):
4538 platform_name = lldbplatformutil .getPlatform ()
39+ arch = lldbplatformutil .getArchitecture ()
4640 os_name = getOSName (platform_name )
4741 platform = lldb .selected_platform
4842 major = platform .GetOSMajorVersion ()
@@ -121,7 +115,7 @@ class C4<U> {
121115 with open (self .getBuildArtifact ("main.swift" ), 'w' ) as main :
122116 main .write (program % (os_name , version ))
123117
124- self .build (dictionary = {'TRIPLE' : getTriple (platform_name ,
118+ self .build (dictionary = {'TRIPLE' : getTriple (platform_name , arch ,
125119 getOlderVersion (major , minor ))})
126120 source_spec = lldb .SBFileSpec ("main.swift" )
127121 (target , process , thread , brk0 ) = \
0 commit comments