fix the path detection of lldb

This commit is contained in:
Sylvestre Ledru 2017-01-09 14:54:57 +00:00
parent 04ffd2599e
commit 246e26c24a
3 changed files with 33 additions and 5 deletions

View File

@ -12,16 +12,24 @@ which could then break something else.
This probably should have upstream bug but I couldn't find any existing report. This probably should have upstream bug but I couldn't find any existing report.
Index: llvm-toolchain-snapshot_4.0~svn291344/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Index: llvm-toolchain-snapshot_4.0~svn291432/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
=================================================================== ===================================================================
--- llvm-toolchain-snapshot_4.0~svn291344.orig/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp --- llvm-toolchain-snapshot_4.0~svn291432.orig/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ llvm-toolchain-snapshot_4.0~svn291344/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ llvm-toolchain-snapshot_4.0~svn291432/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -39,7 +39,7 @@ @@ -32,6 +32,7 @@
#include "lldb/Target/Process.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/ScopedPrinter.h"
+#include "llvm/Config/llvm-config.h"
// Project includes
#include "ProcessGDBRemoteLog.h"
@@ -39,7 +40,7 @@
#if defined(__APPLE__) #if defined(__APPLE__)
#define DEBUGSERVER_BASENAME "debugserver" #define DEBUGSERVER_BASENAME "debugserver"
#else #else
-#define DEBUGSERVER_BASENAME "lldb-server" -#define DEBUGSERVER_BASENAME "lldb-server"
+# define DEBUGSERVER_BASENAME "lldb-server-4.0" +# define DEBUGSERVER_BASENAME "lldb-server-"LLVM_VERSION_STRING
#endif #endif
#if defined(HAVE_LIBCOMPRESSION) #if defined(HAVE_LIBCOMPRESSION)

View File

@ -0,0 +1,19 @@
Index: llvm-toolchain-snapshot_4.0~svn291432/lldb/tools/lldb-server/CMakeLists.txt
===================================================================
--- llvm-toolchain-snapshot_4.0~svn291432.orig/lldb/tools/lldb-server/CMakeLists.txt
+++ llvm-toolchain-snapshot_4.0~svn291432/lldb/tools/lldb-server/CMakeLists.txt
@@ -183,7 +183,13 @@ else()
target_link_libraries(lldb-server ${LLDB_USED_LIBS})
target_link_libraries(lldb-server ${CLANG_USED_LIBS})
endif()
-llvm_config(lldb-server ${LLVM_LINK_COMPONENTS})
+if(NOT LLVM_LINK_LLVM_DYLIB)
+ # This is necessary in !LLVM_LINK_LLVM_DYLIB as LLDB's libs do not track their
+ # dependencies properly. It is conditional because in a LLVM_LINK_LLVM_DYLIB
+ # build it would introduce duplicate symbols (add_lldb_tool links to libLLVM,
+ # and this would add the individual .a files as well).
+ llvm_config(lldb-server ${LLVM_LINK_COMPONENTS})
+endif()
target_link_libraries(lldb-server ${LLDB_SYSTEM_LIBS})

View File

@ -43,3 +43,4 @@ clang-fix-cmpxchg8-detection-on-i386.patch
lldb-addversion-suffix-to-llvm-server-exec.patch lldb-addversion-suffix-to-llvm-server-exec.patch
lldb-missing-install.diff lldb-missing-install.diff
silent-test-failing-codeverage.diff silent-test-failing-codeverage.diff
lldb-server-link-issue.patch