Blame SOURCES/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch

53102b
From 3dc5722d5c7673a879f2b4680369d3ac8b6b64b6 Mon Sep 17 00:00:00 2001
53102b
From: Tom Stellard <tstellar@redhat.com>
53102b
Date: Wed, 4 Aug 2021 14:05:38 -0700
53102b
Subject: [PATCH] cmake: Allow shared libraries to customize the soname using
53102b
 LLVM_ABI_REVISION
53102b
53102b
The LLVM_ABI_REVISION variable is intended to be used for release
53102b
candidates which introduce an ABI change to a shared library.  This
53102b
variable can be specified per library, so there is not one global value
53102b
for all of LLVM.
53102b
53102b
For example, if we LLVM X.0.0-rc2 introduces an ABI change for a library
53102b
compared with LLVM X.0.0-rc1, then the LLVM_ABI_REVISION number for
53102b
library will be incremented by 1.
53102b
53102b
In the main branch, LLVM_ABI_REVISION should always be 0, it is only
53102b
meant to be used in the release branch.
53102b
53102b
Differential Revision: https://reviews.llvm.org/D105594
53102b
---
53102b
 clang/tools/clang-shlib/CMakeLists.txt | 5 +++++
53102b
 3 files changed, 19 insertions(+), 2 deletions(-)
53102b
53102b
diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt
53102b
index 9c1f8ea452b3..4d785924e4bb 100644
53102b
--- a/clang/tools/clang-shlib/CMakeLists.txt
53102b
+++ b/clang/tools/clang-shlib/CMakeLists.txt
53102b
@@ -1,3 +1,8 @@
53102b
+# In the main branch, LLVM_ABI_REVISION should always be 0.  In the release
53102b
+# branches, this should be incremented before each release candidate every
53102b
+# time the ABI of libclang-cpp.so changes.
53102b
+set(LLVM_ABI_REVISION 0)
53102b
+
53102b
 # Building libclang-cpp.so fails if LLVM_ENABLE_PIC=Off
53102b
 if (NOT LLVM_ENABLE_PIC)
53102b
   return()
53102b
-- 
53102b
2.27.0
53102b