Installapi has important distinctions when compared to the clang driver, so much that, it doesn't make much sense to try to integrate into it. This patch partially reverts the CC1 action & driver support to replace with its own driver as a clang tool. For distribution, we could use `LLVM_TOOL_LLVM_DRIVER_BUILD` mechanism for integrating the functionality into clang such that the toolchain size is less impacted.
72 lines
1.7 KiB
Plaintext
72 lines
1.7 KiB
Plaintext
// RUN: rm -rf %t
|
|
// RUN: split-file %s %t
|
|
/// Check basic arguments are captured.
|
|
// RUN: clang-installapi -x objective-c -target arm64-apple-ios13.0.0 \
|
|
// RUN: -fapplication-extension -current_version 1 -install_name /usr/lib/basic.dylib \
|
|
// RUN: %t/basic_inputs.json -o %t/basic.tbd 2>&1 | FileCheck %s --allow-empty
|
|
// RUN: llvm-readtapi -compare %t/basic.tbd %t/expected.tbd 2>&1 | FileCheck %s --allow-empty
|
|
|
|
/// Check multiple targets are captured.
|
|
// RUN: clang-installapi -x objective-c -target arm64-apple-ios14.1 -target arm64e-apple-ios14.1 \
|
|
// RUN: -fapplication-extension -install_name /usr/lib/basic.dylib \
|
|
// RUN: %t/basic_inputs.json -o %t/multi-targets.tbd 2>&1 | FileCheck %s --allow-empty
|
|
// RUN: llvm-readtapi -compare %t/multi-targets.tbd %t/expected-multi.tbd 2>&1 | FileCheck %s --allow-empty
|
|
|
|
// CHECK-NOT: error:
|
|
// CHECK-NOT: warning:
|
|
|
|
//--- basic_inputs.json
|
|
|
|
//--- expected.tbd
|
|
{
|
|
"main_library": {
|
|
"compatibility_versions": [
|
|
{
|
|
"version": "0"
|
|
}
|
|
],
|
|
"install_names": [
|
|
{
|
|
"name": "/usr/lib/basic.dylib"
|
|
}
|
|
],
|
|
"target_info": [
|
|
{
|
|
"min_deployment": "13.0.0",
|
|
"target": "arm64-ios"
|
|
}
|
|
]
|
|
},
|
|
"tapi_tbd_version": 5
|
|
}
|
|
|
|
//--- expected-multi.tbd
|
|
{
|
|
"main_library": {
|
|
"compatibility_versions": [
|
|
{
|
|
"version": "0"
|
|
}],
|
|
"current_versions": [
|
|
{
|
|
"version": "0"
|
|
}],
|
|
"install_names": [
|
|
{
|
|
"name": "/usr/lib/basic.dylib"
|
|
}
|
|
],
|
|
"target_info": [
|
|
{
|
|
"min_deployment": "14.1",
|
|
"target": "arm64-ios"
|
|
},
|
|
{
|
|
"min_deployment": "14.1",
|
|
"target": "arm64e-ios"
|
|
}
|
|
]
|
|
},
|
|
"tapi_tbd_version": 5
|
|
}
|