Compare commits

...

10 Commits

Author SHA1 Message Date
David Abdurachmanov 1494c5ab42
Disable LTO on riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-07 12:28:08 +02:00
Tulio Magno Quites Machado Filho 104f63963a Update to LLVM 17.0.4 2023-11-01 19:46:31 -03:00
Tulio Magno Quites Machado Filho fa80d6c05b Update to LLVM 17.0.3 2023-10-18 09:41:21 -03:00
Tulio Magno Quites Machado Filho 65aefd6f4f Update to LLVM 17.0.2 2023-10-05 08:10:22 -03:00
Tulio Magno Quites Machado Filho 3871817aca Add missing sources 2023-09-26 14:27:08 -03:00
Tulio Magno Quites Machado Filho 10464485d4 Update to LLVM 17.0.1
Manually set CLANG_RESOURCE_DIR based on the rpm macros in order to
avoid using a path that depends on LLVM_LIBDIR_SUFFIX, which is not used
anymore since 2ad36cffbc3fe9169c3c86fa794159841aae9dd0.
2023-09-25 16:06:50 -03:00
Tulio Magno Quites Machado Filho f61239e69a Update to LLVM 17.0.0 RC4 2023-09-11 13:22:58 -03:00
Tulio Magno Quites Machado Filho 6e06ac19ec Update to LLVM 17.0.0 RC3 2023-08-25 18:03:04 -03:00
Tulio Magno Quites Machado Filho 33fc35ad79 Update to LLVM 17.0.0 RC2 2023-08-23 13:54:26 -03:00
Tulio Magno Quites Machado Filho c44bcea462 Update to LLVM 17.0.0 RC1 2023-08-10 13:56:46 -03:00
4 changed files with 156 additions and 4 deletions

View File

@ -0,0 +1,40 @@
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

@ -0,0 +1,80 @@
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

View File

@ -4,13 +4,13 @@
# https://bugzilla.redhat.com/show_bug.cgi?id=2158587
%undefine _include_frame_pointers
%global lldb_version 16.0.6
%global lldb_version 17.0.4
#global rc_ver 4
%global lldb_srcdir %{name}-%{lldb_version}%{?rc_ver:rc%{rc_ver}}.src
Name: lldb
Version: %{lldb_version}%{?rc_ver:~rc%{rc_ver}}
Release: 2%{?dist}
Release: 1.0.riscv64%{?dist}
Summary: Next generation high-performance debugger
License: Apache-2.0 WITH LLVM-exception OR NCSA
@ -71,7 +71,11 @@ The package contains the LLDB Python module.
%autosetup -n %{lldb_srcdir} -p2
%build
%ifnarch riscv64
%global _lto_cflags -flto=thin
%else
%global _lto_cflags %{nil}
%endif
%cmake -GNinja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
@ -93,6 +97,7 @@ The package contains the LLDB Python module.
-DPYTHON_VERSION_MINOR:STRING=$(%{__python3} -c "import sys; print(sys.version_info.minor)") \
-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
-DCLANG_LINK_CLANG_DYLIB=ON \
-DCLANG_RESOURCE_DIR=$(realpath --relative-to=/usr/bin %{clang_resource_dir}) \
-DLLVM_LIT_ARGS="-sv \
--path %{_libdir}/llvm" \
@ -133,6 +138,33 @@ rm -f %{buildroot}%{python3_sitearch}/six.*
%{python3_sitearch}/lldb
%changelog
* Tue Nov 07 2023 David Abdurachmanov <davidlt@rivosinc.com> - 17.0.4-1.0.riscv64
- Disable LTO on riscv64
* Wed Nov 01 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.4-1
- Update to LLVM 17.0.4
* Wed Oct 18 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.3-1
- Update to LLVM 17.0.3
* Wed Oct 04 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.2-1
- Update to LLVM 17.0.2
* Mon Sep 25 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.1-1
- Update to LLVM 17.0.1
* Mon Sep 11 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc4-1
- Update to LLVM 17.0.0 RC4
* Fri Aug 25 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc3-1
- Update to LLVM 17.0.0 RC3
* Wed Aug 23 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc2-1
- Update to LLVM 17.0.0 RC2
* Wed Aug 02 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc1-1
- Update to LLVM 17.0.0 RC1
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 16.0.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

View File

@ -1,2 +1,2 @@
SHA512 (lldb-16.0.6.src.tar.xz) = 85c611c362d96b302df9b981bb9c8bd754938d0b55c5e24220f333300b48ac9bd3b7eb708be1f3ba9dcfbebe621e6562841b38d8458110452e5cc06c714e8d10
SHA512 (lldb-16.0.6.src.tar.xz.sig) = bb93c93cfe082631dd00b3727ed6f36dc3ac450c331a8bf5444be947614e7409e7468021e2ae9155a5bad7e7166d7a6b12ea69692a89f2316ff2bb0d0e8200d7
SHA512 (lldb-17.0.4.src.tar.xz) = fffdfe1884a9fa040d6a4b33324cf598b3604cdc311037d0c1c5163ff932e8991ea5763c351d2867a37092bd895877372ebec650be3f8d600a2e515d77ff0f32
SHA512 (lldb-17.0.4.src.tar.xz.sig) = 481918fddd7f7e17a7a272264be5031c65b3c569f3ef1e0acda2cef822e74bb1f5c340a48b7142127bfd32fd7935abf90418b911ce4e5540e39e0d2799f35eec