[PATCH] D66393: Set version for libclang

Isuru Fernando via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 18 10:15:08 PDT 2019


isuruf created this revision.
Herald added subscribers: cfe-commits, mgorny.
Herald added a project: clang.
isuruf added a reviewer: clang.
isuruf updated this revision to Diff 215782.

This sets the compatibility version to major version
and current version to the full version and also creates
symlinks so that different library versions can be installed
side by side as in linux


https://reviews.llvm.org/D66393

Files:
  tools/libclang/CMakeLists.txt


Index: tools/libclang/CMakeLists.txt
===================================================================
--- tools/libclang/CMakeLists.txt
+++ tools/libclang/CMakeLists.txt
@@ -115,9 +115,10 @@
       VERSION ${LIBCLANG_LIBRARY_VERSION}
       DEFINE_SYMBOL _CINDEX_LIB_)
   elseif(APPLE)
-    set(LIBCLANG_LINK_FLAGS " -Wl,-compatibility_version -Wl,1")
-    set(LIBCLANG_LINK_FLAGS "${LIBCLANG_LINK_FLAGS} -Wl,-current_version -Wl,${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
-
+    set_target_properties(libclang
+      PROPERTIES
+      VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}
+      SOVERSION ${LIBCLANG_LIBRARY_VERSION})
     set_property(TARGET libclang APPEND_STRING PROPERTY
                  LINK_FLAGS ${LIBCLANG_LINK_FLAGS})
   else()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66393.215782.patch
Type: text/x-patch
Size: 804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190818/52664d5e/attachment.bin>


More information about the cfe-commits mailing list