@@ -16,15 +16,8 @@ def getOSName(os):
16
16
if os == 'watchos' : return 'watchOS'
17
17
return os
18
18
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 } "
28
21
29
22
def getOlderVersion (major , minor ):
30
23
if minor != 0 :
@@ -43,6 +36,7 @@ def setUp(self):
43
36
@skipIf (oslist = ['linux' , 'windows' ])
44
37
def testAvailability (self ):
45
38
platform_name = lldbplatformutil .getPlatform ()
39
+ arch = lldbplatformutil .getArchitecture ()
46
40
os_name = getOSName (platform_name )
47
41
platform = lldb .selected_platform
48
42
major = platform .GetOSMajorVersion ()
@@ -121,7 +115,7 @@ class C4<U> {
121
115
with open (self .getBuildArtifact ("main.swift" ), 'w' ) as main :
122
116
main .write (program % (os_name , version ))
123
117
124
- self .build (dictionary = {'TRIPLE' : getTriple (platform_name ,
118
+ self .build (dictionary = {'TRIPLE' : getTriple (platform_name , arch ,
125
119
getOlderVersion (major , minor ))})
126
120
source_spec = lldb .SBFileSpec ("main.swift" )
127
121
(target , process , thread , brk0 ) = \
0 commit comments