mirror of
https://src.fedoraproject.org/rpms/llvm.git
synced 2024-12-28 05:59:35 +00:00
a7e3073a2c
We've established the habit of numbering patches the following way: 0-499: All patches that are unconditionally applied 500-1000: Patches applied under certain conditions (e.g. only on RHEL8) 1500-1599: Patches for LLVM 15 1600-1699: Patches for LLVM 16 1700-1799: Patches for LLVM 17 ... 2000-2099: Patches for LLVM 20 The idea behind this is that the last range of patch numbers (e.g. 2000-2099) allow us to "deprecate" a patch instead of deleting it right away. Suppose llvm upstream in git is at version 20 and there's a patch living in some PR that has not been merged yet. You can copy that patch and put it in a line like: Patch2011: upstream.patch As time goes by, llvm moves on to LLVM 21 and meanwhile the patch has landed. There's no need for you to remove the "Patch2011:" line. In fact, we encourage you to not remove it for some time. For compat libraries and compat packages we might still need this patch and so we're applying it automatically for you in those situations. Remember that a compat library is always at least one major version behind the latest packaged LLVM version. I've restored a patch for an older version of LLVM: We needed to move the `0001-Always-build-shared-libs-for-LLD.patch` from the `0-499` range to the `19xx` (current release) and `20xx` (snapshots) range. In addition the old version of the patch was restored with the following command and added to the `18xx` range: ``` $ git show 0656f30e3739d2d371d58f2fad66d634a766e0fe:0001-Always-build-shared-libs-for-LLD.patch > 0001-18-Always-build-shared-libs-for-LLD.patch ``` This was needed because the `bundle_compat_lib` (RHEL only) build condition needs the old version of the patch.
30 lines
927 B
Diff
30 lines
927 B
Diff
From 69faadbc396000bfa60c722f6fb9c0fc3fb2daf0 Mon Sep 17 00:00:00 2001
|
|
From: Nikita Popov <npopov@redhat.com>
|
|
Date: Wed, 8 May 2024 12:30:36 +0900
|
|
Subject: [PATCH] Always build shared libs for LLD
|
|
|
|
We don't want to enable BUILD_SHARED_LIBS for the whole build,
|
|
but we do want to build lld libraries.
|
|
---
|
|
lld/cmake/modules/AddLLD.cmake | 5 ++---
|
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/lld/cmake/modules/AddLLD.cmake b/lld/cmake/modules/AddLLD.cmake
|
|
index 9f2684b6f933..743ec87814a2 100644
|
|
--- a/lld/cmake/modules/AddLLD.cmake
|
|
+++ b/lld/cmake/modules/AddLLD.cmake
|
|
@@ -7,9 +7,8 @@ macro(add_lld_library name)
|
|
""
|
|
""
|
|
${ARGN})
|
|
- if(ARG_SHARED)
|
|
- set(ARG_ENABLE_SHARED SHARED)
|
|
- endif()
|
|
+ # Always build shared libs for LLD.
|
|
+ set(ARG_ENABLE_SHARED SHARED)
|
|
llvm_add_library(${name} ${ARG_ENABLE_SHARED} ${ARG_UNPARSED_ARGUMENTS})
|
|
|
|
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
|
--
|
|
2.45.1
|
|
|