[llvm-branch-commits] [clang] 039d1a9 - [clang] Move the soname declaration in a variable at the top of the file

Sylvestre Ledru via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Aug 31 23:53:36 PDT 2021


Author: Sylvestre Ledru
Date: 2021-09-01T08:51:43+02:00
New Revision: 039d1a94b908d786965bf4fd35f9e933ca899719

URL: https://github.com/llvm/llvm-project/commit/039d1a94b908d786965bf4fd35f9e933ca899719
DIFF: https://github.com/llvm/llvm-project/commit/039d1a94b908d786965bf4fd35f9e933ca899719.diff

LOG: [clang] Move the soname declaration in a variable at the top of the file

Currently, it is a bit buried in the file even if this is
pretty important for distro.

Reviewed By: MaskRay

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

Added: 
    

Modified: 
    clang/tools/libclang/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt
index 7148bdccfba48..bf88dca0a34b1 100644
--- a/clang/tools/libclang/CMakeLists.txt
+++ b/clang/tools/libclang/CMakeLists.txt
@@ -1,3 +1,9 @@
+# The SOVERSION should be updated only if a change is made to the libclang
+# ABI, and when it is updated, it should be updated to the current
+# LLVM_VERSION_MAJOR.
+# Please also see clang/tools/libclang/libclang.map
+set(CLANG_SONAME 13)
+
 set(SOURCES
   ARCMigrate.cpp
   BuildSystem.cpp
@@ -171,12 +177,9 @@ if(ENABLE_SHARED)
     set_property(SOURCE ARCMigrate.cpp APPEND PROPERTY
                  OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libclang.map)
 
-    # The SOVERSION should be updated only if a change is made to the libclang
-    # ABI, and when it is updated, it should be updated to the current
-    # LLVM_VERSION_MAJOR.
     set_target_properties(libclang PROPERTIES
                           VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}
-                          SOVERSION 13)
+                          SOVERSION ${CLANG_SONAME})
   endif()
 endif()
 


        


More information about the llvm-branch-commits mailing list