Skip to content

Commit 3d07dc6

Browse files
committed
lit.cfg: add a %target-future-triple substitution.
Expands to, e.g. `x86_64-apple-macosx99.99` This is useful to test features which are available in a "future" runtime.
1 parent 682c905 commit 3d07dc6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/lit.cfg

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,7 @@ if run_vendor == 'apple':
778778
config.stable_abi_triple = '%s-%s-ios13.1-macabi' % (run_cpu, run_vendor)
779779
config.pre_stable_abi_triple = config.stable_abi_triple
780780
config.next_stable_abi_triple = config.stable_abi_triple
781+
config.future_abi_triple = '%s-%s-ios99-macabi' % (run_cpu, run_vendor)
781782
config.available_features.add('swift_stable_abi')
782783
else:
783784
# iOS 12.2 does not support 32-bit targets, so we cannot run tests that
@@ -818,11 +819,22 @@ if run_vendor == 'apple':
818819
next_stable_version = NEXT_STABLE_VERSION.get(run_os, '')
819820
config.next_stable_abi_triple = '%s-%s-%s%s%s' % (run_cpu, run_vendor, run_os,
820821
next_stable_version, run_environment)
822+
FUTURE_VERSION = {
823+
'macosx': '99.99',
824+
'ios': '99.0',
825+
'maccatalyst': '99.99',
826+
'tvos': '99.0',
827+
'watchos': '9.99.0'
828+
}
829+
future_version = FUTURE_VERSION.get(run_os, '')
830+
config.future_triple = '%s-%s-%s%s%s' % (run_cpu, run_vendor, run_os,
831+
future_version, run_environment)
821832

822833
else:
823834
config.pre_stable_abi_triple = config.variant_triple
824835
config.stable_abi_triple = config.variant_triple
825836
config.next_stable_abi_triple = config.variant_triple
837+
config.future_triple = config.variant_triple
826838

827839
# On Apple platforms, this substitution names the maximum OS version *without*
828840
# Swift in the OS. On non-Apple platforms this is equivalent to %target-triple.
@@ -839,6 +851,9 @@ config.substitutions.append(('%target-stable-abi-triple',
839851
config.substitutions.append(('%target-next-stable-abi-triple',
840852
config.next_stable_abi_triple))
841853

854+
config.substitutions.append(('%target-future-triple',
855+
config.future_triple))
856+
842857
# Sanitizers are not supported on iOS7, yet all tests are configured to start
843858
# testing with the earliest supported platform, which happens to be iOS7 for
844859
# Swift.

0 commit comments

Comments
 (0)