Remove unused patches

These patches have been removed from the spec file, but remained in the
repo.
This commit is contained in:
Tulio Magno Quites Machado Filho 2023-10-25 15:35:48 -03:00
parent a4a9a8b957
commit 6476637d55
2 changed files with 0 additions and 120 deletions

View File

@ -1,40 +0,0 @@
From 6888de118707e6392b46073fc35738804f9f1d80 Mon Sep 17 00:00:00 2001
From: Alex Langford <alangford@apple.com>
Date: Mon, 31 Jul 2023 16:30:17 -0700
Subject: [PATCH] [lldb] Fix building LLDB standlone without framework
In a809720102fae8d1b5a7073f99f9dae9395c5f41 I refactored some logic to
deal with the clang resource directory in standalone LLDB builds.
However, this logic escaped me because it only runs when you do not
build LLDB.framework.
Differential Revision: https://reviews.llvm.org/D156763
---
lldb/source/API/CMakeLists.txt | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt
index a55754726c58..39ac451c471c 100644
--- a/lldb/source/API/CMakeLists.txt
+++ b/lldb/source/API/CMakeLists.txt
@@ -204,13 +204,11 @@ else()
# When building the LLDB framework, this isn't necessary as there we copy everything we need into
# the framework (including the Clang resourece directory).
if(NOT LLDB_BUILD_FRAMEWORK)
- set(LLDB_CLANG_RESOURCE_DIR_PARENT "$<TARGET_FILE_DIR:liblldb>/clang")
- file(MAKE_DIRECTORY "${LLDB_CLANG_RESOURCE_DIR_PARENT}")
+ set(LLDB_CLANG_RESOURCE_DIR "$<TARGET_FILE_DIR:liblldb>/clang")
add_custom_command(TARGET liblldb POST_BUILD
- COMMENT "Linking Clang resource dir into LLDB build directory: ${LLDB_CLANG_RESOURCE_DIR_PARENT}"
- COMMAND ${CMAKE_COMMAND} -E make_directory "${LLDB_CLANG_RESOURCE_DIR_PARENT}"
- COMMAND ${CMAKE_COMMAND} -E create_symlink "${LLDB_EXTERNAL_CLANG_RESOURCE_DIR}"
- "${LLDB_CLANG_RESOURCE_DIR_PARENT}/${LLDB_CLANG_RESOURCE_DIR_NAME}"
+ COMMENT "Linking Clang resource dir into LLDB build directory: ${LLDB_CLANG_RESOURCE_DIR}"
+ COMMAND ${CMAKE_COMMAND} -E create_symlink
+ "${LLDB_EXTERNAL_CLANG_RESOURCE_DIR}" "${LLDB_CLANG_RESOURCE_DIR}"
)
endif()
endif()
--
2.41.0

View File

@ -1,80 +0,0 @@
From a809720102fae8d1b5a7073f99f9dae9395c5f41 Mon Sep 17 00:00:00 2001
From: Alex Langford <alangford@apple.com>
Date: Tue, 25 Jul 2023 15:38:04 -0700
Subject: [PATCH] [lldb][NFCI] Change logic to find clang resource dir in
standalone builds
As of 0beffb854209a41f31beb18f9631258349a99299 there is a CMake
function to actually calculate the relative path to the clang resource
directory. Currently we have some bespoke logic that looks in a few
places, but with this new function we should be able to eliminate some
complexity here.
Also, I moved the functionality from LLDBConfig to LLDBStandalone since
it is only used in standalone builds.
Differential Revision: https://reviews.llvm.org/D156270
---
lldb/cmake/modules/LLDBConfig.cmake | 24 ------------------------
lldb/cmake/modules/LLDBStandalone.cmake | 13 +++++++++++++
2 files changed, 13 insertions(+), 24 deletions(-)
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index 1393342dd5cb..ce90ecabc6a5 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -282,30 +282,6 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
endif()
endif()
-
-# If LLDB is building against a prebuilt Clang, then the Clang resource
-# directory that LLDB is using for its embedded Clang instance needs to point
-# to the resource directory of the used Clang installation.
-if (NOT TARGET clang-resource-headers)
- set(LLDB_CLANG_RESOURCE_DIR_NAME "${LLVM_VERSION_MAJOR}")
- # Iterate over the possible places where the external resource directory
- # could be and pick the first that exists.
- foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}"
- "${LLVM_BUILD_LIBRARY_DIR}"
- "${LLVM_LIBRARY_DIR}")
- # Build the resource directory path by appending 'clang/<version number>'.
- set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
- if (IS_DIRECTORY "${CANDIDATE_RESOURCE_DIR}")
- set(LLDB_EXTERNAL_CLANG_RESOURCE_DIR "${CANDIDATE_RESOURCE_DIR}")
- break()
- endif()
- endforeach()
-
- if (NOT LLDB_EXTERNAL_CLANG_RESOURCE_DIR)
- message(FATAL_ERROR "Expected directory for clang-resource headers not found: ${LLDB_EXTERNAL_CLANG_RESOURCE_DIR}")
- endif()
-endif()
-
# Find Apple-specific libraries or frameworks that may be needed.
if (APPLE)
if(NOT APPLE_EMBEDDED)
diff --git a/lldb/cmake/modules/LLDBStandalone.cmake b/lldb/cmake/modules/LLDBStandalone.cmake
index e9bcabcb63de..fd16716d7141 100644
--- a/lldb/cmake/modules/LLDBStandalone.cmake
+++ b/lldb/cmake/modules/LLDBStandalone.cmake
@@ -128,3 +128,16 @@ endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
+
+# If LLDB is building against a prebuilt Clang, then the Clang resource
+# directory that LLDB is using for its embedded Clang instance needs to point to
+# the resource directory of the used Clang installation.
+if (NOT TARGET clang-resource-headers)
+ include(GetClangResourceDir)
+ get_clang_resource_dir(LLDB_EXTERNAL_CLANG_RESOURCE_DIR
+ PREFIX "${Clang_DIR}/../../../")
+
+ if (NOT EXISTS ${LLDB_EXTERNAL_CLANG_RESOURCE_DIR})
+ message(FATAL_ERROR "Expected directory for clang-resource-headers not found: ${LLDB_EXTERNAL_CLANG_RESOURCE_DIR}")
+ endif()
+endif()
--
2.41.0