Skip to content

Commit 6c313ab

Browse files
authored
Merge pull request #60928 from apple/fix-protocol-conformance-collision-test4
[Test] Fix protocol_conformance_collision.swift.
2 parents ceb510d + 1220321 commit 6c313ab

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

test/Runtime/protocol_conformance_collision.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift %s -o %t/newSDK %target-link-sdk-future-version
2+
// RUN: %target-build-swift %s -o %t/newSDK %target-link-sdk-2021-version
33
// RUN: %target-codesign %t/newSDK
44
// RUN: %target-run %t/newSDK newSDK
55
// RUN: %target-build-swift %s -o %t/oldSDK %target-link-sdk-2020-version

test/lit.cfg

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,6 +1338,15 @@ if run_vendor == 'apple':
13381338
'watchos': '7.0'
13391339
}
13401340
sdk_2020_version = SDK_2020_VERSION.get(run_os, '')
1341+
SDK_2021_VERSION = {
1342+
'macosx': '12.0',
1343+
'ios': '15.0',
1344+
'maccatalyst': '15.0',
1345+
'tvos': '15.0',
1346+
'watchos': '8.0',
1347+
'xros': '1.0'
1348+
}
1349+
sdk_2021_version = SDK_2021_VERSION.get(run_os, '')
13411350
linker_os = {
13421351
'iphoneos': 'ios',
13431352
'appletvos': 'tvos',
@@ -1351,6 +1360,9 @@ if run_vendor == 'apple':
13511360
config.target_link_sdk_2020_version = (
13521361
"-Xlinker -platform_version -Xlinker %s -Xlinker %s -Xlinker %s" %
13531362
(linker_os, sdk_2020_version, sdk_2020_version))
1363+
config.target_link_sdk_2021_version = (
1364+
"-Xlinker -platform_version -Xlinker %s -Xlinker %s -Xlinker %s" %
1365+
(linker_os, sdk_2021_version, sdk_2021_version))
13541366
config.target_link_sdk_future_version = (
13551367
"-Xlinker -platform_version -Xlinker %s -Xlinker %s -Xlinker %s" %
13561368
(linker_os, target_future_version, target_future_version))
@@ -2472,6 +2484,9 @@ if hasattr(config, 'otool_classic'):
24722484
if hasattr(config, 'target_link_sdk_2020_version'):
24732485
config.substitutions.append(('%target-link-sdk-2020-version',
24742486
config.target_link_sdk_2020_version))
2487+
if hasattr(config, 'target_link_sdk_2021_version'):
2488+
config.substitutions.append(('%target-link-sdk-2021-version',
2489+
config.target_link_sdk_2021_version))
24752490
if hasattr(config, 'target_link_sdk_future_version'):
24762491
config.substitutions.append(('%target-link-sdk-future-version',
24772492
config.target_link_sdk_future_version))

0 commit comments

Comments
 (0)