| 1 |
; RUN: rm -rf %t |
| 2 |
; RUN: split-file %s %t |
| 3 |
|
| 4 |
// All passes should include Foo macro definition. |
| 5 |
; RUN: clang-installapi -target arm64-apple-macos12 \ |
| 6 |
; RUN: -install_name @rpath/libfoo.dylib -current_version 1 \ |
| 7 |
; RUN: -compatibility_version 1 \ |
| 8 |
; RUN: -I%S/Inputs/LibFoo/usr/include -dynamiclib \ |
| 9 |
; RUN: -extra-public-header %S/Inputs/LibFoo/usr/include/foo.h \ |
| 10 |
; RUN: -o %t/output.tbd \ |
| 11 |
; RUN: -DFoo -XApple -DDarwin=1 -XElf -DNONDarwin=1 2>&1 | FileCheck -allow-empty %s |
| 12 |
; RUN: llvm-readtapi --compare %t/output.tbd %t/expected.tbd 2>&1 | FileCheck -allow-empty %s |
| 13 |
|
| 14 |
; RUN: clang-installapi -target arm64-apple-macos12 \ |
| 15 |
; RUN: -install_name @rpath/libfoo.dylib \ |
| 16 |
; RUN: -current_version 1 -compatibility_version 1 \ |
| 17 |
; RUN: -I%S/Inputs/LibFoo/usr/include -dynamiclib \ |
| 18 |
; RUN: -extra-public-header %S/Inputs/LibFoo/usr/include/foo.h \ |
| 19 |
; RUN: -o %t/output2.tbd \ |
| 20 |
; RUN: -DFoo -optionlist %t/options.json 2>&1 | FileCheck -allow-empty %s |
| 21 |
; RUN: llvm-readtapi --compare %t/output.tbd %t/expected.tbd 2>&1 | FileCheck -allow-empty %s |
| 22 |
|
| 23 |
; CHECK-NOT: error |
| 24 |
; CHECK-NOT: warning |
| 25 |
|
| 26 |
|
| 27 |
//--- expected.tbd |
| 28 |
{ |
| 29 |
"main_library": { |
| 30 |
"exported_symbols": [ |
| 31 |
{ |
| 32 |
"text": { |
| 33 |
"global": [ |
| 34 |
"_FooLib$foo$darwin", |
| 35 |
"_FooLib$foo$linux", |
| 36 |
"_FooLib$foo" |
| 37 |
] |
| 38 |
} |
| 39 |
} |
| 40 |
], |
| 41 |
"flags": [ |
| 42 |
{ |
| 43 |
"attributes": [ |
| 44 |
"not_app_extension_safe" |
| 45 |
] |
| 46 |
} |
| 47 |
], |
| 48 |
"install_names": [ |
| 49 |
{ |
| 50 |
"name": "@rpath/libfoo.dylib" |
| 51 |
} |
| 52 |
], |
| 53 |
"target_info": [ |
| 54 |
{ |
| 55 |
"min_deployment": "12", |
| 56 |
"target": "arm64-macos" |
| 57 |
} |
| 58 |
] |
| 59 |
}, |
| 60 |
"tapi_tbd_version": 5 |
| 61 |
} |
| 62 |
|
| 63 |
//--- options.json |
| 64 |
{ |
| 65 |
"Apple" : ["-DDarwin=1"], |
| 66 |
"Elf" : ["-DNONDarwin"] |
| 67 |
} |