Add compatibility version to liblldb in framework builds
authorAlex Langford <apl@fb.com>
Wed, 12 Sep 2018 18:10:22 +0000 (18:10 +0000)
committerAlex Langford <apl@fb.com>
Wed, 12 Sep 2018 18:10:22 +0000 (18:10 +0000)
Summary:
Building LLDB with xcodebuild sets the compatibility version of liblldb
in LLDB.framework. Building the framework with cmake does not set the
compatibility version, and so it defaults to 0.0.0. This is a discrepency in the
difference between the xcode build and the cmake build.

I tested this change by building without this patch. From the build tree I ran
`otool -L Library/Frameworks/LLDB.framework/Versions/A/LLDB` and got this:
```
@rpath/LLDB.framework/Versions/A/LLDB (compatibility version 0.0.0, current version 8.0.0)
```

Did the same with this patch and the output contained this:
```
@rpath/LLDB.framework/Versions/A/LLDB (compatibility version 1.0.0, current version 8.0.0)
```

Reviewers: clayborg, labath

Subscribers: mgorny, lldb-commits

Differential Revision: https://reviews.llvm.org/D51959

llvm-svn: 342066

lldb/source/API/CMakeLists.txt

index fefab4bf84ffd5e50afb462ed5d1412d7f04b058..3c5f4ddb43f69e3f92a9f54a5f9ff5a2b47bfbce 100644 (file)
@@ -146,6 +146,7 @@ endif()
 if (LLDB_BUILD_FRAMEWORK)
   set_target_properties(liblldb
     PROPERTIES
+    SOVERSION "1.0.0"
     OUTPUT_NAME LLDB
     FRAMEWORK On
     FRAMEWORK_VERSION ${LLDB_FRAMEWORK_VERSION}