Skip to content

Commit b43e864

Browse files
committed
Generalize tests for Apple Silicon
1 parent 7589520 commit b43e864

File tree

4 files changed

+36
-17
lines changed

4 files changed

+36
-17
lines changed

test/Concurrency/Backdeploy/linking.swift

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift -target x86_64-apple-macosx12 %s -o %t/linking_direct
3-
// RUN: %target-build-swift -target x86_64-apple-macosx11 %s -o %t/linking_rpath
4-
// RUN: %target-build-swift -target x86_64-apple-macosx10.10 %s -o %t/linking_rpath_old
2+
// RUN: %target-build-swift -target %target-cpu-apple-macosx12 %s -o %t/linking_direct
3+
// RUN: %target-build-swift -target %target-cpu-apple-macosx11 %s -o %t/linking_rpath
4+
// RUN: %target-build-swift -target %target-cpu-apple-macosx10.10 %s -o %t/linking_rpath_old
55

66
// RUN: otool -L %t/linking_direct | %FileCheck -check-prefix CHECK-DIRECT %s
77
// RUN: otool -L %t/linking_rpath | %FileCheck -check-prefix CHECK-RPATH %s
88
// RUN: otool -L %t/linking_rpath_old | %FileCheck -check-prefix CHECK-RPATH %s
99

10-
// RUN: %target-build-swift -disable-autolinking-runtime-compatibility-concurrency -target x86_64-apple-ios15.0-macabi %s -o %t/linking_direct
11-
// RUN: %target-build-swift -disable-autolinking-runtime-compatibility-concurrency -target x86_64-apple-ios14.0-macabi %s -o %t/linking_rpath
12-
13-
// RUN: otool -L %t/linking_direct | %FileCheck -check-prefix CHECK-DIRECT %s
14-
// RUN: otool -L %t/linking_rpath | %FileCheck -check-prefix CHECK-RPATH %s
15-
1610
// REQUIRES: OS=macosx
17-
// REQUIRES: CPU=x86_64
18-
// REQUIRES: maccatalyst_support
1911

2012
// CHECK-DIRECT: /usr/lib/swift/libswift_Concurrency.dylib
2113
// CHECK-RPATH: @rpath/libswift_Concurrency.dylib
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-build-swift -target %target-cpu-apple-macosx12 %s -o %t/linking_direct
3+
// RUN: %target-build-swift -target %target-cpu-apple-macosx11 %s -o %t/linking_rpath
4+
// RUN: %target-build-swift -target %target-cpu-apple-macosx10.10 %s -o %t/linking_rpath_old
5+
6+
// RUN: otool -L %t/linking_direct | %FileCheck -check-prefix CHECK-DIRECT %s
7+
// RUN: otool -L %t/linking_rpath | %FileCheck -check-prefix CHECK-RPATH %s
8+
// RUN: otool -L %t/linking_rpath_old | %FileCheck -check-prefix CHECK-RPATH %s
9+
10+
// RUN: %target-build-swift -disable-autolinking-runtime-compatibility-concurrency -target %target-cpu-apple-ios15.0-macabi %s -o %t/linking_direct
11+
// RUN: %target-build-swift -disable-autolinking-runtime-compatibility-concurrency -target %target-cpu-apple-ios14.0-macabi %s -o %t/linking_rpath
12+
13+
// RUN: otool -L %t/linking_direct | %FileCheck -check-prefix CHECK-DIRECT %s
14+
// RUN: otool -L %t/linking_rpath | %FileCheck -check-prefix CHECK-RPATH %s
15+
16+
// REQUIRES: OS=macosx
17+
// REQUIRES: maccatalyst_support
18+
19+
// CHECK-DIRECT: /usr/lib/swift/libswift_Concurrency.dylib
20+
// CHECK-RPATH: @rpath/libswift_Concurrency.dylib
21+
22+
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
23+
public struct X {
24+
public func f() async -> Int { return 0 }
25+
public func g() async -> Int {
26+
await f()
27+
}
28+
}

test/Concurrency/Backdeploy/mangling.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend %s -target x86_64-apple-macosx12.0 -module-name main -emit-ir -o %t/new.ir
2+
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir -o %t/new.ir
33
// RUN: %FileCheck %s --check-prefix=NEW < %t/new.ir
4-
// RUN: %target-swift-frontend %s -target x86_64-apple-macosx10.15 -module-name main -emit-ir -o %t/old.ir -disable-availability-checking
4+
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -o %t/old.ir -disable-availability-checking
55
// RUN: %FileCheck %s --check-prefix=OLD < %t/old.ir
66

77
// Check that we add extra type metadata accessors for new kinds of functions
88
// when back-deploying. These are used instead of using demangling cache
99
// variables since old runtimes cannot synthesize type metadata based on the
1010
// new mangling.
1111

12-
// RUN: %target-build-swift -target x86_64-apple-macosx10.15 %s -o %t/test_mangling -Xfrontend -disable-availability-checking
12+
// RUN: %target-build-swift -target %target-cpu-apple-macosx10.15 %s -o %t/test_mangling -Xfrontend -disable-availability-checking
1313
// RUN: %target-run %t/test_mangling
1414

15-
// REQUIRES: CPU=x86_64
15+
// REQUIRESx: CPU=x86_64
1616
// REQUIRES: OS=macosx
1717
// REQUIRES: executable_test
1818
// REQUIRES: concurrency_runtime

test/Concurrency/Backdeploy/objc_actor.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift -target x86_64-apple-macosx10.15 %s -o %t/test_backdeploy -Xfrontend -parse-as-library
2+
// RUN: %target-build-swift -target %target-cpu-apple-macosx11 %s -o %t/test_backdeploy -Xfrontend -parse-as-library
33
// RUN: %target-run %t/test_backdeploy
44

5-
// REQUIRES: CPU=x86_64
65
// REQUIRES: OS=macosx
76
// REQUIRES: executable_test
87
// REQUIRES: concurrency_runtime

0 commit comments

Comments
 (0)