Skip to content

Commit 781aa53

Browse files
committed
[Apple Silicon] [Test] Generalize api-digester tests for Apple Silicon macOS.
Most of this is enabled by an upstream change to generalize the tests for the api-digester to properly handle all targets. The primary change here is to account for the Swift-level ABI differences for the standard library between Apple Silicon macOS and Intel macOS. Specifically, anything related to Float80 will be removed from the standard library on Apple Silicon macOS, so account for the differences.
1 parent 7c94216 commit 781aa53

File tree

5 files changed

+42
-1
lines changed

5 files changed

+42
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// swift-interface-format-version: 1.0
2+
// swift-tools-version: Apple Swift version 5.1 (swiftlang-1100.0.38 clang-1100.0.20.14)
3+
// swift-module-flags: -target arm64-apple-macos10.14 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name SwiftFoo
4+
import Swift
5+
public class RemovedClass {
6+
@objc deinit
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// swift-interface-format-version: 1.0
2+
// swift-tools-version: Apple Swift version 5.1 (swiftlang-1100.0.38 clang-1100.0.20.14)
3+
// swift-module-flags: -target arm64-apple-macos10.14 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name SwiftFoo
4+
import Swift
5+
public class AddedClass {
6+
@objc deinit
7+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Constructor BinaryFloatingPoint.init(_:) has been removed
2+
Constructor Double.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
3+
Constructor Double.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
4+
Constructor Float.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
5+
Constructor Float.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
6+
Constructor Int.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
7+
Constructor Int.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
8+
Constructor Int16.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
9+
Constructor Int16.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
10+
Constructor Int32.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
11+
Constructor Int32.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
12+
Constructor Int64.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
13+
Constructor Int64.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
14+
Constructor Int8.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
15+
Constructor Int8.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
16+
Constructor UInt.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
17+
Constructor UInt.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
18+
Constructor UInt16.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
19+
Constructor UInt16.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
20+
Constructor UInt32.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
21+
Constructor UInt32.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
22+
Constructor UInt64.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
23+
Constructor UInt64.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
24+
Constructor UInt8.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
25+
Constructor UInt8.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
26+
Struct Float80 has been removed
27+
TypeAlias CLongDouble has underlying type change from Swift.Float80 to Swift.Double

test/api-digester/stability-stdlib-source.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
// RUN: %empty-directory(%t.tmp)
33
// mkdir %t.tmp/module-cache && mkdir %t.tmp/dummy.sdk
44
// RUN: %api-digester -diagnose-sdk -module Swift -o %t.tmp/changes.txt -module-cache-path %t.tmp/module-cache -sdk %t.tmp/dummy.sdk -avoid-location
5-
// RUN: %clang -E -P -x c %S/Outputs/stability-stdlib-source.swift.expected -o - | sed '/^\s*$/d' | sort > %t.tmp/stability-stdlib-source.swift.expected
5+
// RUN: %clang -E -P -x c %S/Outputs/stability-stdlib-source-%target-cpu.swift.expected -o - | sed '/^\s*$/d' | sort > %t.tmp/stability-stdlib-source.swift.expected
66
// RUN: %clang -E -P -x c %t.tmp/changes.txt -o - | sed '/^\s*$/d' | sort > %t.tmp/changes.txt.tmp
77
// RUN: diff -u %t.tmp/stability-stdlib-source.swift.expected %t.tmp/changes.txt.tmp

0 commit comments

Comments
 (0)