70 lines · plain
1; RUN: rm -rf %t2; RUN: split-file %s %t3 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=INSTALLAPI11; RUN: llvm-readtapi --compare %t/output.tbd %t/expected.tbd 2>&1 | FileCheck -allow-empty %s12 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 %s21 22; CHECK-NOT: error23; CHECK-NOT: warning24 25; INSTALLAPI: Public Headers:26; INSTALLAPI: Apple Public Headers:27; INSTALLAPI: Elf Public Headers:28 29;--- options.json30{31 "Apple" : ["-DDarwin=1"],32 "Elf" : ["-DNONDarwin=1"]33}34 35;--- expected.tbd36{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": 569}70