| 1 |
; RUN: rm -rf %t |
| 2 |
; RUN: split-file %s %t |
| 3 |
; RUN: mkdir -p %t/System/Library/Frameworks |
| 4 |
; RUN: cp -r %S/Inputs/Simple/Simple.framework %t/System/Library/Frameworks/ |
| 5 |
; RUN: yaml2obj %S/Inputs/Simple/Simple.yaml -o %t/Simple |
| 6 |
|
| 7 |
; RUN: not clang-installapi -target x86_64h-apple-macos10.12 \ |
| 8 |
; RUN: -install_name /System/Library/Frameworks/Simple.framework/Versions/A/Simple \ |
| 9 |
; RUN: -current_version 3 -compatibility_version 2 \ |
| 10 |
; RUN: -o tmp.tbd --verify-against=%t/Simple 2>&1 | FileCheck -check-prefix=ARCHITECTURE %s |
| 11 |
; ARCHITECTURE: error: architectures do not match: 'x86_64h' (provided) vs 'x86_64' (found) |
| 12 |
|
| 13 |
; RUN: not clang-installapi -target x86_64-apple-macos10.12 \ |
| 14 |
; RUN: -install_name Simple -dynamiclib \ |
| 15 |
; RUN: -current_version 3 -compatibility_version 2 \ |
| 16 |
; RUN: -o tmp.tbd --verify-against=%t/Simple 2>&1 | FileCheck -check-prefix=INSTALL_NAME %s |
| 17 |
; INSTALL_NAME: error: install_name does not match: 'Simple' (provided) vs '/System/Library/Frameworks/Simple.framework/Versions/A/Simple' (found) |
| 18 |
|
| 19 |
; RUN: not clang-installapi -target x86_64-apple-macos10.12 \ |
| 20 |
; RUN: -install_name /System/Library/Frameworks/Simple.framework/Versions/A/Simple \ |
| 21 |
; RUN: -current_version 3 -compatibility_version 2 \ |
| 22 |
; RUN: -o tmp.tbd --verify-against=%t/Simple 2>&1 | FileCheck -check-prefix=CURRENT_VERSION %s |
| 23 |
; CURRENT_VERSION: error: current_version does not match: '3' (provided) vs '1.2.3' (found) |
| 24 |
|
| 25 |
; RUN: not clang-installapi -target x86_64-apple-macos10.12 \ |
| 26 |
; RUN: -install_name /System/Library/Frameworks/Simple.framework/Versions/A/Simple \ |
| 27 |
; RUN: -current_version 1.2.3 -compatibility_version 2 \ |
| 28 |
; RUN: -o tmp.tbd --verify-against=%t/Simple 2>&1 | FileCheck -check-prefix=COMPATIBILITY_VERSION %s |
| 29 |
; COMPATIBILITY_VERSION: error: compatibility_version does not match: '2' (provided) vs '1' (found) |
| 30 |
|
| 31 |
; RUN: not clang-installapi -target x86_64-apple-macos10.12 \ |
| 32 |
; RUN: -install_name /System/Library/Frameworks/Simple.framework/Versions/A/Simple \ |
| 33 |
; RUN: -current_version 1.2.3 -compatibility_version 1 -fapplication-extension \ |
| 34 |
; RUN: -o tmp.tbd --verify-against=%t/Simple 2>&1 | FileCheck -check-prefix=APPEXTSAFE %s |
| 35 |
; APPEXTSAFE: error: the ApplicationExtensionSafe flag does not match: 'true' (provided) vs 'false' (found) |
| 36 |
|
| 37 |
; RUN: not clang-installapi -target x86_64-apple-macos10.12 \ |
| 38 |
; RUN: -install_name /System/Library/Frameworks/Simple.framework/Versions/A/Simple \ |
| 39 |
; RUN: -current_version 1.2.3 -compatibility_version 1 -not_for_dyld_shared_cache \ |
| 40 |
; RUN: -o tmp.tbd --verify-against=%t/Simple 2>&1 | FileCheck -check-prefix=SHARED_CACHE %s |
| 41 |
; SHARED_CACHE: error: the NotForDyldSharedCache flag does not match: 'true' (provided) vs 'false' (found) |
| 42 |
|
| 43 |
; RUN: not clang-installapi -target x86_64-apple-macos10.12 \ |
| 44 |
; RUN: -install_name /System/Library/Frameworks/Simple.framework/Versions/A/Simple \ |
| 45 |
; RUN: -current_version 1.2.3 -compatibility_version 1 \ |
| 46 |
; RUN: -allowable_client Foo -allowable_client Bar \ |
| 47 |
; RUN: -o tmp.tbd --verify-against=%t/Simple 2>&1 | FileCheck -check-prefix=ALLOWABLE %s |
| 48 |
; ALLOWABLE: error: allowable client missing from binary file: '{{Foo|Bar}} [ x86_64 ]' |
| 49 |
|
| 50 |
; RUN: not clang-installapi -target x86_64-apple-macos10.12 \ |
| 51 |
; RUN: -install_name /System/Library/Frameworks/Simple.framework/Versions/A/Simple \ |
| 52 |
; RUN: -current_version 1.2.3 -compatibility_version 1 -reexport_library %t/Foo.tbd \ |
| 53 |
; RUN: -o tmp.tbd --verify-against=%t/Simple 2>&1 | FileCheck -check-prefix=REEXPORT %s |
| 54 |
; REEXPORT: error: re-exported library missing from binary file: 'Foo [ x86_64 ]' |
| 55 |
|
| 56 |
; RUN: not clang-installapi -target x86_64-apple-macos10.12 \ |
| 57 |
; RUN: -install_name /System/Library/Frameworks/Simple.framework/Versions/A/Simple \ |
| 58 |
; RUN: -current_version 1.2.3 -compatibility_version 1 -umbrella Bogus \ |
| 59 |
; RUN: -o tmp.tbd --verify-against=%t/Simple 2>&1 | FileCheck -check-prefix=UMBRELLA %s |
| 60 |
; UMBRELLA: error: parent umbrella missing from binary file: 'Bogus' |
| 61 |
|
| 62 |
;--- Foo.tbd |
| 63 |
{ |
| 64 |
"main_library": { |
| 65 |
"install_names": [ |
| 66 |
{ |
| 67 |
"name": "Foo" |
| 68 |
} |
| 69 |
], |
| 70 |
"target_info": [ |
| 71 |
{ |
| 72 |
"min_deployment": "13.0", |
| 73 |
"target": "arm64-macos" |
| 74 |
} |
| 75 |
] |
| 76 |
}, |
| 77 |
"tapi_tbd_version": 5 |
| 78 |
} |