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

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