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