Projects like libc use mutually exclusive macros to compile files multiple times and then merge the result into the final library. For installapi to accept these, we'd need to parse the same declarations in different ways. This patch adds the basic pipelining for installapi to create the correct TBD file. * -Xproject allows: -fmodules, -fobjc-arc, fvisibility=hidden, prefix headers * -Xlabel allows: -D and -U settings * Error on 'private' and 'public' labels -X<label> * Xplatform allows: -iframework <path> This is to support the case where zippered frameworks want to pass in iOSSupport search path.
55 lines
1.2 KiB
Plaintext
55 lines
1.2 KiB
Plaintext
; RUN: rm -rf %t
|
|
; RUN: split-file %s %t
|
|
|
|
; RUN: clang-installapi \
|
|
; RUN: -target arm64-apple-macos12 -install_name @rpath/libfoo.dylib \
|
|
; RUN: -current_version 1 -compatibility_version 1 \
|
|
; RUN: -XApple -DDarwin=1 -XElf -DNONDarwin=1 \
|
|
; RUN: -I%S/Inputs/LibFoo/usr/include -dynamiclib \
|
|
; RUN: -extra-public-header %S/Inputs/LibFoo/usr/include/public.h \
|
|
; RUN: -o %t/output.tbd -v 2>&1 | FileCheck %s --check-prefix=INSTALLAPI
|
|
; RUN: llvm-readtapi --compare %t/output.tbd %t/expected.tbd 2>&1 | FileCheck -allow-empty %s
|
|
|
|
; CHECK-NOT: error
|
|
; CHECK-NOT: warning
|
|
|
|
; INSTALLAPI: Public Headers:
|
|
; INSTALLAPI: Apple Public Headers:
|
|
; INSTALLAPI: Elf Public Headers:
|
|
|
|
;--- expected.tbd
|
|
{
|
|
"main_library": {
|
|
"exported_symbols": [
|
|
{
|
|
"text": {
|
|
"global": [
|
|
"_foo$darwin",
|
|
"_foo$linux",
|
|
"_foo"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"flags": [
|
|
{
|
|
"attributes": [
|
|
"not_app_extension_safe"
|
|
]
|
|
}
|
|
],
|
|
"install_names": [
|
|
{
|
|
"name": "@rpath/libfoo.dylib"
|
|
}
|
|
],
|
|
"target_info": [
|
|
{
|
|
"min_deployment": "12",
|
|
"target": "arm64-macos"
|
|
}
|
|
]
|
|
},
|
|
"tapi_tbd_version": 5
|
|
}
|