File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 2
2
// RUN: split-file %s %t
3
3
/// Check basic arguments are captured.
4
4
// RUN: clang-installapi -x objective-c -target arm64-apple-ios13.0.0 \
5
- // RUN: -fapplication-extension -current_version 1 -install_name /usr/lib/basic.dylib \
5
+ // RUN: -fapplication-extension -current_version 1 -compatibility_version 1 \
6
+ // RUN: -install_name /usr/lib/basic.dylib \
6
7
// RUN: %t/basic_inputs.json -o %t/basic.tbd 2>&1 | FileCheck %s --allow-empty
7
8
// RUN: llvm-readtapi -compare %t/basic.tbd %t/expected.tbd 2>&1 | FileCheck %s --allow-empty
8
9
25
26
//--- expected.tbd
26
27
{
27
28
"main_library": {
28
- "compatibility_versions": [
29
- {
30
- "version": "0"
31
- }
32
- ],
33
29
"install_names": [
34
30
{
35
31
"name": "/usr/lib/basic.dylib"
Original file line number Diff line number Diff line change @@ -85,6 +85,9 @@ bool Options::processLinkerOptions(InputArgList &Args) {
85
85
if (auto *Arg = Args.getLastArg (OPT_current__version))
86
86
LinkerOpts.CurrentVersion .parse64 (Arg->getValue ());
87
87
88
+ if (auto *Arg = Args.getLastArg (OPT_compatibility__version))
89
+ LinkerOpts.CompatVersion .parse64 (Arg->getValue ());
90
+
88
91
LinkerOpts.IsDylib = Args.hasArg (OPT_dynamiclib);
89
92
90
93
LinkerOpts.AppExtensionSafe =
@@ -159,6 +162,7 @@ InstallAPIContext Options::createContext() {
159
162
160
163
Ctx.BA .InstallName = LinkerOpts.InstallName ;
161
164
Ctx.BA .CurrentVersion = LinkerOpts.CurrentVersion ;
165
+ Ctx.BA .CompatVersion = LinkerOpts.CompatVersion ;
162
166
Ctx.BA .AppExtensionSafe = LinkerOpts.AppExtensionSafe ;
163
167
Ctx.FT = DriverOpts.OutFT ;
164
168
Ctx.OutputLoc = DriverOpts.OutputPath ;
Original file line number Diff line number Diff line change @@ -49,6 +49,9 @@ struct LinkerOptions {
49
49
// / \brief The current version to use for the dynamic library.
50
50
PackedVersion CurrentVersion;
51
51
52
+ // / \brief The compatibility version to use for the dynamic library.
53
+ PackedVersion CompatVersion;
54
+
52
55
// / \brief Is application extension safe.
53
56
bool AppExtensionSafe = false ;
54
57
You can’t perform that action at this time.
0 commit comments