1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
; RUN: rm -rf %t
; RUN: split-file %s %t
; RUN: llvm-readtapi -merge %t/i386.tbd %t/x86_64.tbd %t/arm64.tbd --filetype tbd-v5 -o %t/out.tbd -compact 2>&1 | FileCheck %s --allow-empty
; RUN: llvm-readtapi -merge %t/i386.tbd %t/x86_64.tbd %t/arm64.tbd --filetype=tbd-v5 --o %t/out.tbd -compact 2>&1 | FileCheck %s --allow-empty
; RUN: llvm-readtapi -compare %t/out.tbd %t/expected.tbd 2>&1 | FileCheck %s --allow-empty
; CHECK-NOT: error
; CHECK-NOT: warning
;--- expected.tbd
{
"main_library": {
"allowable_clients": [{ "clients": ["ClientAll"] }],
"exported_symbols": [
{
"data": {
"global": ["_sym1"],
"objc_class": ["_A"],
"thread_local": ["_tlv1"],
"weak": ["_weak1"]
}
},
{
"data": {
"objc_ivar": ["_A._ivar1"]
},
"targets": [ "x86_64-macos", "arm64-macos" ]
}
],
"install_names": [
{ "name": "/usr/lib/libfat.dylib" }
],
"reexported_libraries": [
{
"names": [ "/usr/lib/liball.dylib" ]
}
],
"target_info": [
{ "target": "i386-macos" },
{
"min_deployment": "13.1",
"target": "x86_64-macos"
},
{
"target": "arm64-macos"
}
]
},
"tapi_tbd_version": 5
}
;--- i386.tbd
--- !tapi-tbd-v3
archs: [ i386 ]
platform: macosx
install-name: /usr/lib/libfat.dylib
exports:
- archs: [ i386 ]
allowable-clients: [ ClientAll ]
re-exports: [ /usr/lib/liball.dylib ]
symbols: [ _sym1 ]
objc-classes: [ _A ]
weak-def-symbols: [ _weak1 ]
thread-local-symbols: [ _tlv1 ]
...
;--- x86_64.tbd
{
"main_library": {
"allowable_clients": [
{
"clients": [
"ClientAll"
]
}
],
"exported_symbols": [
{
"data": {
"global": [
"_sym1"
],
"objc_class": [
"_A"
],
"objc_ivar": [
"_A._ivar1"
],
"thread_local": [
"_tlv1"
],
"weak": [
"_weak1"
]
}
}
],
"install_names": [
{
"name": "/usr/lib/libfat.dylib"
}
],
"reexported_libraries": [
{
"names": [
"/usr/lib/liball.dylib"
]
}
],
"target_info": [
{
"min_deployment": "13.1",
"target": "x86_64-macos"
}
]
},
"tapi_tbd_version": 5
}
;--- arm64.tbd
--- !tapi-tbd
tbd-version: 4
targets: [ arm64-macos ]
install-name: '/usr/lib/libfat.dylib'
allowable-clients:
- targets: [ arm64-macos ]
clients: [ ClientAll ]
reexported-libraries:
- targets: [ arm64-macos ]
libraries: [ '/usr/lib/liball.dylib' ]
exports:
- targets: [ arm64-macos ]
symbols: [ _sym1 ]
objc-classes: [ _A ]
objc-ivars: [ _A._ivar1 ]
weak-symbols: [ _weak1 ]
thread-local-symbols: [ _tlv1 ]
...
|