tstellar / rpms / llvm

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