mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-06-15 18:05:28 +00:00
cherry-pick pending patch to fix the build issues
This commit is contained in:
parent
157ea71cc3
commit
96c9ec40b4
231
debian/patches/lldb-server-pthread.diff
vendored
Normal file
231
debian/patches/lldb-server-pthread.diff
vendored
Normal file
@ -0,0 +1,231 @@
|
|||||||
|
Index: llvm-toolchain-snapshot_6.0~svn316564/lldb/scripts/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-snapshot_6.0~svn316564.orig/lldb/scripts/CMakeLists.txt
|
||||||
|
+++ llvm-toolchain-snapshot_6.0~svn316564/lldb/scripts/CMakeLists.txt
|
||||||
|
@@ -48,10 +48,10 @@ add_custom_command(
|
||||||
|
--swigExecutable=${SWIG_EXECUTABLE}
|
||||||
|
VERBATIM
|
||||||
|
COMMENT "Python script building LLDB Python wrapper")
|
||||||
|
-set_source_files_properties(${LLDB_WRAP_PYTHON} PROPERTIES GENERATED 1)
|
||||||
|
+add_custom_target(swig_wrapper ALL DEPENDS ${LLDB_WRAP_PYTHON})
|
||||||
|
+
|
||||||
|
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/lldb.py PROPERTIES GENERATED 1)
|
||||||
|
|
||||||
|
-add_custom_target(swig_wrapper ALL DEPENDS ${LLDB_WRAP_PYTHON})
|
||||||
|
|
||||||
|
# Install the LLDB python module
|
||||||
|
install(DIRECTORY ${SWIG_PYTHON_DIR} DESTINATION ${SWIG_INSTALL_DIR})
|
||||||
|
Index: llvm-toolchain-snapshot_6.0~svn316564/lldb/source/API/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-snapshot_6.0~svn316564.orig/lldb/source/API/CMakeLists.txt
|
||||||
|
+++ llvm-toolchain-snapshot_6.0~svn316564/lldb/source/API/CMakeLists.txt
|
||||||
|
@@ -2,10 +2,6 @@ if ( CMAKE_SYSTEM_NAME MATCHES "Windows"
|
||||||
|
add_definitions( -DEXPORT_LIBLLDB )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-# Include this so that add_lldb_library() has the list of dependencies
|
||||||
|
-# for liblldb to link against
|
||||||
|
-include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
|
||||||
|
-
|
||||||
|
option(LLDB_BUILD_FRAMEWORK "Build the Darwin LLDB.framework" Off)
|
||||||
|
|
||||||
|
if(LLDB_BUILD_FRAMEWORK AND CMAKE_VERSION VERSION_LESS 3.7)
|
||||||
|
@@ -117,9 +113,17 @@ if (LLVM_ENABLE_WERROR)
|
||||||
|
set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " -w")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
+set_source_files_properties(${LLDB_WRAP_PYTHON} PROPERTIES GENERATED 1)
|
||||||
|
+if (CLANG_CL)
|
||||||
|
+ set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING
|
||||||
|
+ PROPERTY COMPILE_FLAGS " -Wno-unused-function")
|
||||||
|
+endif()
|
||||||
|
+if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND
|
||||||
|
+ NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
|
||||||
|
+ set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING
|
||||||
|
+ PROPERTY COMPILE_FLAGS " -Wno-sequence-point -Wno-cast-qual")
|
||||||
|
+endif ()
|
||||||
|
|
||||||
|
-# This should not be part of LLDBDependencies.cmake, because we don't
|
||||||
|
-# want every single library taking a dependency on the script interpreters.
|
||||||
|
target_link_libraries(liblldb PRIVATE
|
||||||
|
lldbPluginScriptInterpreterNone
|
||||||
|
lldbPluginScriptInterpreterPython
|
||||||
|
@@ -156,7 +160,6 @@ endif()
|
||||||
|
if (LLDB_WRAP_PYTHON)
|
||||||
|
add_dependencies(liblldb swig_wrapper)
|
||||||
|
endif()
|
||||||
|
-target_link_libraries(liblldb PRIVATE ${LLDB_SYSTEM_LIBS})
|
||||||
|
|
||||||
|
if(LLDB_BUILD_FRAMEWORK)
|
||||||
|
file(GLOB public_headers ${LLDB_SOURCE_DIR}/include/lldb/API/*.h
|
||||||
|
Index: llvm-toolchain-snapshot_6.0~svn316564/lldb/source/Utility/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-snapshot_6.0~svn316564.orig/lldb/source/Utility/CMakeLists.txt
|
||||||
|
+++ llvm-toolchain-snapshot_6.0~svn316564/lldb/source/Utility/CMakeLists.txt
|
||||||
|
@@ -1,3 +1,44 @@
|
||||||
|
+set(LLDB_SYSTEM_LIBS)
|
||||||
|
+
|
||||||
|
+# Windows-only libraries
|
||||||
|
+if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
||||||
|
+ list(APPEND LLDB_SYSTEM_LIBS
|
||||||
|
+ ws2_32
|
||||||
|
+ rpcrt4
|
||||||
|
+ )
|
||||||
|
+endif ()
|
||||||
|
+
|
||||||
|
+if (NOT LLDB_DISABLE_LIBEDIT)
|
||||||
|
+ list(APPEND LLDB_SYSTEM_LIBS edit)
|
||||||
|
+endif()
|
||||||
|
+if (NOT LLDB_DISABLE_CURSES)
|
||||||
|
+ list(APPEND LLDB_SYSTEM_LIBS ${CURSES_LIBRARIES})
|
||||||
|
+ if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO)
|
||||||
|
+ list(APPEND LLDB_SYSTEM_LIBS ${TERMINFO_LIBS})
|
||||||
|
+ endif()
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
+if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB )
|
||||||
|
+ list(APPEND LLDB_SYSTEM_LIBS atomic)
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
+list(APPEND LLDB_SYSTEM_LIBS ${Backtrace_LIBRARY})
|
||||||
|
+
|
||||||
|
+if (NOT LLDB_DISABLE_PYTHON AND NOT LLVM_BUILD_STATIC)
|
||||||
|
+ list(APPEND LLDB_SYSTEM_LIBS ${PYTHON_LIBRARIES})
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
+list(APPEND LLDB_SYSTEM_LIBS ${system_libs})
|
||||||
|
+
|
||||||
|
+if (LLVM_BUILD_STATIC)
|
||||||
|
+ if (NOT LLDB_DISABLE_PYTHON)
|
||||||
|
+ list(APPEND LLDB_SYSTEM_LIBS python2.7 util)
|
||||||
|
+ endif()
|
||||||
|
+ if (NOT LLDB_DISABLE_CURSES)
|
||||||
|
+ list(APPEND LLDB_SYSTEM_LIBS gpm)
|
||||||
|
+ endif()
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
add_lldb_library(lldbUtility
|
||||||
|
Baton.cpp
|
||||||
|
Connection.cpp
|
||||||
|
@@ -38,7 +79,8 @@ add_lldb_library(lldbUtility
|
||||||
|
VMRange.cpp
|
||||||
|
|
||||||
|
LINK_LIBS
|
||||||
|
- # lldbUtility cannot have any dependencies
|
||||||
|
+ ${LLDB_SYSTEM_LIBS}
|
||||||
|
+ # lldbUtility does not depend on other LLDB libraries
|
||||||
|
|
||||||
|
LINK_COMPONENTS
|
||||||
|
BinaryFormat
|
||||||
|
Index: llvm-toolchain-snapshot_6.0~svn316564/lldb/tools/argdumper/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-snapshot_6.0~svn316564.orig/lldb/tools/argdumper/CMakeLists.txt
|
||||||
|
+++ llvm-toolchain-snapshot_6.0~svn316564/lldb/tools/argdumper/CMakeLists.txt
|
||||||
|
@@ -1,11 +1,8 @@
|
||||||
|
-include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
|
||||||
|
-
|
||||||
|
add_lldb_tool(lldb-argdumper INCLUDE_IN_FRAMEWORK
|
||||||
|
argdumper.cpp
|
||||||
|
|
||||||
|
LINK_LIBS
|
||||||
|
lldbUtility
|
||||||
|
)
|
||||||
|
-
|
||||||
|
install(TARGETS lldb-argdumper
|
||||||
|
RUNTIME DESTINATION bin)
|
||||||
|
Index: llvm-toolchain-snapshot_6.0~svn316564/lldb/tools/driver/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-snapshot_6.0~svn316564.orig/lldb/tools/driver/CMakeLists.txt
|
||||||
|
+++ llvm-toolchain-snapshot_6.0~svn316564/lldb/tools/driver/CMakeLists.txt
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
|
||||||
|
-
|
||||||
|
if ((CMAKE_SYSTEM_NAME MATCHES "Windows") OR
|
||||||
|
(CMAKE_SYSTEM_NAME MATCHES "NetBSD" ))
|
||||||
|
# These targets do not have getopt support, so they rely on the one provided by
|
||||||
|
Index: llvm-toolchain-snapshot_6.0~svn316564/lldb/tools/intel-features/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-snapshot_6.0~svn316564.orig/lldb/tools/intel-features/CMakeLists.txt
|
||||||
|
+++ llvm-toolchain-snapshot_6.0~svn316564/lldb/tools/intel-features/CMakeLists.txt
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
|
||||||
|
-
|
||||||
|
# Flags to control each individual feature
|
||||||
|
option(LLDB_BUILD_INTEL_MPX "Enable Building of Intel(R) Memory Protection Extensions" ON)
|
||||||
|
option(LLDB_BUILD_INTEL_PT "Enable Building of Intel(R) Processor Trace Tool" OFF)
|
||||||
|
@@ -63,7 +61,6 @@ add_lldb_library(lldbIntelFeatures SHARE
|
||||||
|
# Add link dependencies for python wrapper
|
||||||
|
if (NOT LLDB_DISABLE_PYTHON AND LLDB_BUILD_INTEL_PT)
|
||||||
|
add_dependencies(lldbIntelFeatures intel-features-swig_wrapper)
|
||||||
|
- target_link_libraries(lldbIntelFeatures PRIVATE ${LLDB_SYSTEM_LIBS})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(TARGETS lldbIntelFeatures
|
||||||
|
Index: llvm-toolchain-snapshot_6.0~svn316564/lldb/tools/lldb-server/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-snapshot_6.0~svn316564.orig/lldb/tools/lldb-server/CMakeLists.txt
|
||||||
|
+++ llvm-toolchain-snapshot_6.0~svn316564/lldb/tools/lldb-server/CMakeLists.txt
|
||||||
|
@@ -24,41 +24,6 @@ endif ()
|
||||||
|
|
||||||
|
include_directories(../../source)
|
||||||
|
|
||||||
|
-set(LLDB_SYSTEM_LIBS)
|
||||||
|
-if (NOT LLDB_DISABLE_LIBEDIT)
|
||||||
|
- list(APPEND LLDB_SYSTEM_LIBS edit)
|
||||||
|
-endif()
|
||||||
|
-if (NOT LLDB_DISABLE_CURSES)
|
||||||
|
- list(APPEND LLDB_SYSTEM_LIBS ${CURSES_LIBRARIES})
|
||||||
|
- if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO)
|
||||||
|
- list(APPEND LLDB_SYSTEM_LIBS ${TERMINFO_LIBS})
|
||||||
|
- endif()
|
||||||
|
-endif()
|
||||||
|
-
|
||||||
|
-if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB )
|
||||||
|
- list(APPEND LLDB_SYSTEM_LIBS atomic)
|
||||||
|
-endif()
|
||||||
|
-
|
||||||
|
-# On FreeBSD/NetBSD backtrace() is provided by libexecinfo, not libc.
|
||||||
|
-if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD")
|
||||||
|
- list(APPEND LLDB_SYSTEM_LIBS execinfo)
|
||||||
|
-endif()
|
||||||
|
-
|
||||||
|
-if (NOT LLDB_DISABLE_PYTHON AND NOT LLVM_BUILD_STATIC)
|
||||||
|
- list(APPEND LLDB_SYSTEM_LIBS ${PYTHON_LIBRARIES})
|
||||||
|
-endif()
|
||||||
|
-
|
||||||
|
-list(APPEND LLDB_SYSTEM_LIBS ${system_libs})
|
||||||
|
-
|
||||||
|
-if (LLVM_BUILD_STATIC)
|
||||||
|
- if (NOT LLDB_DISABLE_PYTHON)
|
||||||
|
- list(APPEND LLDB_SYSTEM_LIBS python2.7 util)
|
||||||
|
- endif()
|
||||||
|
- if (NOT LLDB_DISABLE_CURSES)
|
||||||
|
- list(APPEND LLDB_SYSTEM_LIBS gpm)
|
||||||
|
- endif()
|
||||||
|
-endif()
|
||||||
|
-
|
||||||
|
set(LLDB_PLUGINS)
|
||||||
|
|
||||||
|
if(CMAKE_SYSTEM_NAME MATCHES "Linux|Android")
|
||||||
|
Index: llvm-toolchain-snapshot_6.0~svn316564/lldb/unittests/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-snapshot_6.0~svn316564.orig/lldb/unittests/CMakeLists.txt
|
||||||
|
+++ llvm-toolchain-snapshot_6.0~svn316564/lldb/unittests/CMakeLists.txt
|
||||||
|
@@ -11,8 +11,6 @@ else ()
|
||||||
|
list(APPEND LLVM_COMPILE_FLAGS -include ${LLDB_GTEST_COMMON_INCLUDE})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
-include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
|
||||||
|
-
|
||||||
|
if (LLDB_BUILT_STANDALONE)
|
||||||
|
# Build the gtest library needed for unittests, if we have LLVM sources
|
||||||
|
# handy.
|
||||||
|
@@ -46,7 +44,7 @@ function(add_lldb_unittest test_name)
|
||||||
|
POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/Inputs)
|
||||||
|
|
||||||
|
- target_link_libraries(${test_name} ${ARG_LINK_LIBS} ${LLDB_SYSTEM_LIBS})
|
||||||
|
+ target_link_libraries(${test_name} ${ARG_LINK_LIBS})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(add_unittest_inputs test_name inputs)
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -46,3 +46,4 @@ disable-error-xray.diff
|
|||||||
lldb-disable-swig-error.diff
|
lldb-disable-swig-error.diff
|
||||||
silent-test-macho.diff
|
silent-test-macho.diff
|
||||||
silent-llvm-isel-fuzzer.diff
|
silent-llvm-isel-fuzzer.diff
|
||||||
|
lldb-server-pthread.diff
|
||||||
|
Loading…
Reference in New Issue
Block a user