[llvm-branch-commits] [lldb] r259241 - Merging r259188:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jan 29 13:01:50 PST 2016


Author: hans
Date: Fri Jan 29 15:01:49 2016
New Revision: 259241

URL: http://llvm.org/viewvc/llvm-project?rev=259241&view=rev
Log:
Merging r259188:
------------------------------------------------------------------------
r259188 | labath | 2016-01-29 03:59:57 -0800 (Fri, 29 Jan 2016) | 17 lines

Fix linking of lldb-server with BUILD_SHARED_LIBS

Summary:
The BUILD_SHARED_LIBS branch of lldb-server link flags was hopelessly broken, at least since we
started restricting the symbols exported by liblldb. lldb-server depends on symbols from the
lldb_private namespace, so it cannot link to the public interface of liblldb. Instead I make it
link to the individual libraries constituting liblldb, just like it does in the
!BUILD_SHARED_LIBS case.

This does not make the BUILD_SHARED_LIBS build of lldb fully functional yet, due to the way
liblldb dependencies are managed, but it's a step in that direction.

Reviewers: zturner, tfiala

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D16678
------------------------------------------------------------------------

Modified:
    lldb/branches/release_38/   (props changed)
    lldb/branches/release_38/tools/lldb-server/CMakeLists.txt

Propchange: lldb/branches/release_38/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 29 15:01:49 2016
@@ -1,3 +1,3 @@
 /lldb/branches/apple/python-GIL:156467-162159
 /lldb/branches/iohandler:198360-200250
-/lldb/trunk:257691-257692
+/lldb/trunk:257691-257692,259188

Modified: lldb/branches/release_38/tools/lldb-server/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_38/tools/lldb-server/CMakeLists.txt?rev=259241&r1=259240&r2=259241&view=diff
==============================================================================
--- lldb/branches/release_38/tools/lldb-server/CMakeLists.txt (original)
+++ lldb/branches/release_38/tools/lldb-server/CMakeLists.txt Fri Jan 29 15:01:49 2016
@@ -33,24 +33,19 @@ add_lldb_executable(lldb-server
     LLDBServerUtilities.cpp
 )
 
-if (BUILD_SHARED_LIBS )
-  target_link_libraries(lldb-server liblldb)
-  target_link_libraries(lldb-server ${LLDB_SYSTEM_LIBS})
+# The Darwin linker doesn't understand --start-group/--end-group.
+if (LLDB_LINKER_SUPPORTS_GROUPS)
+  target_link_libraries(lldb-server
+                        -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)
+  target_link_libraries(lldb-server
+                        -Wl,--start-group ${CLANG_USED_LIBS} -Wl,--end-group)
 else()
-  # The Darwin linker doesn't understand --start-group/--end-group.
-  if (LLDB_LINKER_SUPPORTS_GROUPS)
-    target_link_libraries(lldb-server
-                          -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)
-    target_link_libraries(lldb-server
-                          -Wl,--start-group ${CLANG_USED_LIBS} -Wl,--end-group)
-  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})
-
-  target_link_libraries(lldb-server ${LLDB_SYSTEM_LIBS})
+  target_link_libraries(lldb-server ${LLDB_USED_LIBS})
+  target_link_libraries(lldb-server ${CLANG_USED_LIBS})
 endif()
+llvm_config(lldb-server ${LLVM_LINK_COMPONENTS})
+
+target_link_libraries(lldb-server ${LLDB_SYSTEM_LIBS})
 
 set_target_properties(lldb-server PROPERTIES VERSION ${LLDB_VERSION})
 




More information about the llvm-branch-commits mailing list