Skip to content

Commit f496151

Browse files
committed
Update backdeploy test to handle 5.6 compat lib
This patch updates the concurrency backdeployment test to handle the inclusion of the Swift 5.6 compatibility library. macOS12 will have the 5.6 library applied to it, so the _swift_FORCE_LOAD_$_swiftCompatibility56 symbol is defined weakly.
1 parent 09f39b8 commit f496151

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

test/Concurrency/Backdeploy/weak_linking.swift

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir -o %t/new.ir
2+
3+
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx13.0 -module-name main -emit-ir -o %t/new.ir
34
// RUN: %FileCheck %s --check-prefix=NEW < %t/new.ir
4-
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -o %t/old.ir -disable-availability-checking
5-
// RUN: %FileCheck %s --check-prefix=OLD < %t/old.ir
5+
6+
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir -o %t/backdeploy_56.ir
7+
// RUN: %FileCheck %s --check-prefix=BACKDEPLOY56 < %t/backdeploy_56.ir
8+
9+
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -o %t/backdeployed_concurrency.ir -disable-availability-checking
10+
// RUN: %FileCheck %s --check-prefixes=BACKDEPLOY_CONCURRENCY,BACKDEPLOY56 < %t/backdeployed_concurrency.ir
11+
612
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -O -module-name main -emit-ir -o %t/optimized.ir -disable-availability-checking
713
// RUN: %FileCheck %s --check-prefix=OPTIMIZED < %t/optimized.ir
814

915

1016
// REQUIRES: OS=macosx
1117

1218
// NEW-NOT: extern_weak
13-
// OLD: @"$sScPMn" = extern_weak global
14-
// OLD: declare extern_weak swiftcc i8* @swift_task_alloc
15-
// OLD: declare extern_weak swiftcc %swift.metadata_response @"$sScPMa"
16-
// OLD: declare extern_weak swiftcc i8 @"$sScP8rawValues5UInt8Vvg"
19+
20+
// BACKDEPLOY_CONCURRENCY: @"$sScPMn" = extern_weak global
21+
// BACKDEPLOY_CONCURRENCY: declare extern_weak swiftcc i8* @swift_task_alloc
22+
// BACKDEPLOY_CONCURRENCY: declare extern_weak swiftcc %swift.metadata_response @"$sScPMa"
23+
24+
// BACKDEPLOY_CONCURRENCY: declare extern_weak void @"_swift_FORCE_LOAD_$_swiftCompatibilityConcurrency"()
25+
// BACKDEPLOY56: declare extern_weak void @"_swift_FORCE_LOAD_$_swiftCompatibility56"()
26+
27+
// BACKDEPLOY_CONCURRENCY: declare extern_weak swiftcc i8 @"$sScP8rawValues5UInt8Vvg"
1728

1829
// OPTIMIZED: @swift_async_extendedFramePointerFlags = extern_weak global i8*
1930
// OPTIMIZED: @_swift_async_extendedFramePointerFlagsUser = linkonce_odr hidden global i8** @swift_async_extendedFramePointerFlags

0 commit comments

Comments
 (0)