Debian Codegraph @

clang/test/InstallAPI/variables.test

raw
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3 // RUN: sed -e "s|SRC_DIR|%/t|g" %t/vars_inputs.json.in > %t/vars_inputs.json
4
5 /// Check multiple targets are captured.
6 // RUN: clang-installapi -target arm64-apple-macos13.1 -target arm64e-apple-macos13.1 \
7 // RUN: -fapplication-extension -install_name /usr/lib/vars.dylib -dynamiclib \
8 // RUN: %t/vars_inputs.json -o %t/vars.tbd 2>&1 | FileCheck %s --allow-empty
9 // RUN: llvm-readtapi -compare %t/vars.tbd %t/expected.tbd 2>&1 | FileCheck %s --allow-empty
10
11 // CHECK-NOT: error:
12 // CHECK-NOT: warning:
13
14 //--- vars.h
15 extern int foo;
16
17 //--- vars_inputs.json.in
18 {
19 "headers": [ {
20 "path" : "SRC_DIR/vars.h",
21 "type" : "public"
22 }],
23 "version": "3"
24 }
25
26 //--- expected.tbd
27 {
28 "main_library": {
29 "compatibility_versions": [
30 {
31 "version": "0"
32 }],
33 "current_versions": [
34 {
35 "version": "0"
36 }],
37 "install_names": [
38 {
39 "name": "/usr/lib/vars.dylib"
40 }
41 ],
42 "exported_symbols": [
43 {
44 "data": {
45 "global": [
46 "_foo"
47 ]
48 }
49 }
50 ],
51 "target_info": [
52 {
53 "min_deployment": "13.1",
54 "target": "arm64-macos"
55 },
56 {
57 "min_deployment": "13.1",
58 "target": "arm64e-macos"
59 }
60 ]
61 },
62 "tapi_tbd_version": 5
63 }