Skip to content

Commit 6784930

Browse files
committed
[lit] Use simulator triples consistently.
1 parent 044613a commit 6784930

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

test/IRGen/objc_properties_ios.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %swift -target x86_64-apple-ios9 %S/objc_properties.swift -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-NEW %S/objc_properties.swift
2-
// RUN: %swift -target x86_64-apple-ios8 %S/objc_properties.swift -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-OLD %S/objc_properties.swift
1+
// RUN: %swift -target x86_64-apple-ios9-simulator %S/objc_properties.swift -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-NEW %S/objc_properties.swift
2+
// RUN: %swift -target x86_64-apple-ios8-simulator %S/objc_properties.swift -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-OLD %S/objc_properties.swift
33

44
// REQUIRES: OS=ios
55
// REQUIRES: CPU=x86_64

test/lit.cfg

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,9 @@ if run_os == 'ios' and run_vers.endswith('-macabi'):
328328
run_os = 'maccatalyst'
329329
if run_vers.endswith('-simulator'):
330330
run_vers = run_vers[0:-len('-simulator')]
331+
run_environment='-simulator'
332+
else:
333+
run_environment=''
331334

332335
run_ptrsize = '64' if ('64' in run_cpu or run_cpu == "s390x") else '32'
333336
run_ptrauth = 'ptrauth' if run_cpu == 'arm64e' else 'noptrauth'
@@ -635,8 +638,8 @@ if run_vendor == 'apple':
635638
}
636639
pre_stable_version = PRE_STABLE_VERSION.get(run_os, '')
637640

638-
config.pre_stable_abi_triple = '%s-%s-%s%s' % (run_cpu, run_vendor, run_os,
639-
pre_stable_version)
641+
config.pre_stable_abi_triple = '%s-%s-%s%s%s' % (run_cpu, run_vendor, run_os,
642+
pre_stable_version, run_environment)
640643
STABLE_VERSION = {
641644
'macosx': '10.14.4',
642645
'ios': '12.2',
@@ -645,8 +648,8 @@ if run_vendor == 'apple':
645648
'watchos': '5.2'
646649
}
647650
stable_version = STABLE_VERSION.get(run_os, '')
648-
config.stable_abi_triple = '%s-%s-%s%s' % (run_cpu, run_vendor, run_os,
649-
stable_version)
651+
config.stable_abi_triple = '%s-%s-%s%s%s' % (run_cpu, run_vendor, run_os,
652+
stable_version, run_environment)
650653

651654
NEXT_STABLE_VERSION = {
652655
'macosx': '10.15',
@@ -656,8 +659,9 @@ if run_vendor == 'apple':
656659
'watchos': '6'
657660
}
658661
next_stable_version = NEXT_STABLE_VERSION.get(run_os, '')
659-
config.next_stable_abi_triple = '%s-%s-%s%s' % (run_cpu, run_vendor, run_os,
660-
next_stable_version)
662+
config.next_stable_abi_triple = '%s-%s-%s%s%s' % (run_cpu, run_vendor, run_os,
663+
next_stable_version, run_environment)
664+
661665
else:
662666
config.pre_stable_abi_triple = config.variant_triple
663667
config.stable_abi_triple = config.variant_triple
@@ -1012,7 +1016,8 @@ if run_vendor == 'apple':
10121016
% (config.target_build_swift))
10131017
config.target_add_rpath = r'-Xlinker -rpath -Xlinker \1'
10141018

1015-
target_future = format('%s-apple-%s%s' % (run_cpu, run_os, target_future_version))
1019+
target_future = format('%s-apple-%s%s%s' % (run_cpu, run_os, target_future_version, run_environment))
1020+
10161021
config.otool_classic = ("%s otool-classic" % (xcrun_prefix))
10171022

10181023
elif run_os in ['windows-msvc']:

0 commit comments

Comments
 (0)