[llvm-branch-commits] [lldb] r242690 - Merging r242525:

Hans Wennborg hans at hanshq.net
Mon Jul 20 10:59:03 PDT 2015


Author: hans
Date: Mon Jul 20 12:59:02 2015
New Revision: 242690

URL: http://llvm.org/viewvc/llvm-project?rev=242690&view=rev
Log:
Merging r242525:
------------------------------------------------------------------------
r242525 | labath | 2015-07-17 08:26:27 -0700 (Fri, 17 Jul 2015) | 3 lines

Fix liblldb linking on RHEL 6 (bug #24140)

Patch by Eugene Zelenko.
------------------------------------------------------------------------

Modified:
    lldb/branches/release_37/   (props changed)
    lldb/branches/release_37/cmake/modules/AddLLDB.cmake
    lldb/branches/release_37/cmake/modules/LLDBConfig.cmake
    lldb/branches/release_37/tools/lldb-server/CMakeLists.txt

Propchange: lldb/branches/release_37/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 20 12:59:02 2015
@@ -1,3 +1,3 @@
 /lldb/branches/apple/python-GIL:156467-162159
 /lldb/branches/iohandler:198360-200250
-/lldb/trunk:242306,242381
+/lldb/trunk:242306,242381,242525

Modified: lldb/branches/release_37/cmake/modules/AddLLDB.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_37/cmake/modules/AddLLDB.cmake?rev=242690&r1=242689&r2=242690&view=diff
==============================================================================
--- lldb/branches/release_37/cmake/modules/AddLLDB.cmake (original)
+++ lldb/branches/release_37/cmake/modules/AddLLDB.cmake Mon Jul 20 12:59:02 2015
@@ -3,18 +3,12 @@ function(lldb_link_common_libs name targ
     return()
   endif()
 
-  set(COMPILER_SUPPORTS_GROUPS OFF)
-  if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
-    # The Darwin linker doesn't understand --start-group/--end-group.
-    set(COMPILER_SUPPORTS_GROUPS ON)
-  endif()
-
   if(${targetkind} MATCHES "SHARED")
     set(LINK_KEYWORD ${cmake_2_8_12_PUBLIC})
   endif()
-  
+
   if(${targetkind} MATCHES "SHARED" OR ${targetkind} MATCHES "EXE")
-    if (COMPILER_SUPPORTS_GROUPS)
+    if (LLDB_LINKER_SUPPORTS_GROUPS)
       target_link_libraries(${name} ${LINK_KEYWORD}
                             -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)
     else()
@@ -24,7 +18,7 @@ function(lldb_link_common_libs name targ
 endfunction(lldb_link_common_libs)
 
 macro(add_lldb_library name)
-  # only supported parameters to this macro are the optional 
+  # only supported parameters to this macro are the optional
   # MODULE;SHARED;STATIC library type and source files
   cmake_parse_arguments(PARAM
     "MODULE;SHARED;STATIC;OBJECT"
@@ -66,13 +60,13 @@ macro(add_lldb_library name)
 
     lldb_link_common_libs(${name} "${libkind}")
 
-    
-    target_link_libraries(${name})
-    if (COMPILER_SUPPORTS_GROUPS)
+    if (PARAM_SHARED)
+      if (LLDB_LINKER_SUPPORTS_GROUPS)
         target_link_libraries(${name} ${cmake_2_8_12_PUBLIC}
                     -Wl,--start-group ${CLANG_USED_LIBS} -Wl,--end-group)
-    else()
+      else()
         target_link_libraries(${name} ${cmake_2_8_12_PUBLIC} ${CLANG_USED_LIBS})
+      endif()
     endif()
     llvm_config(${name} ${LLVM_LINK_COMPONENTS})
 

Modified: lldb/branches/release_37/cmake/modules/LLDBConfig.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_37/cmake/modules/LLDBConfig.cmake?rev=242690&r1=242689&r2=242690&view=diff
==============================================================================
--- lldb/branches/release_37/cmake/modules/LLDBConfig.cmake (original)
+++ lldb/branches/release_37/cmake/modules/LLDBConfig.cmake Mon Jul 20 12:59:02 2015
@@ -2,6 +2,12 @@ set(LLDB_PROJECT_ROOT ${CMAKE_CURRENT_SO
 set(LLDB_SOURCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/source")
 set(LLDB_INCLUDE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/include")
 
+set(LLDB_LINKER_SUPPORTS_GROUPS OFF)
+if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
+  # The Darwin linker doesn't understand --start-group/--end-group.
+  set(LLDB_LINKER_SUPPORTS_GROUPS ON)
+endif()
+
 if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
   set(LLDB_DEFAULT_DISABLE_PYTHON 0)
   set(LLDB_DEFAULT_DISABLE_CURSES 1)
@@ -21,7 +27,7 @@ set(LLDB_DISABLE_CURSES ${LLDB_DEFAULT_D
   "Disables the Curses integration.")
 
 set(LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION 1 CACHE BOOL
-  "Enables using new Python scripts for SWIG API generation .")  
+  "Enables using new Python scripts for SWIG API generation .")
 set(LLDB_RELOCATABLE_PYTHON 0 CACHE BOOL
   "Causes LLDB to use the PYTHONHOME environment variable to locate Python.")
 
@@ -40,7 +46,7 @@ if (NOT LLDB_DISABLE_PYTHON)
       set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
     endif()
   endif()
-  
+
   if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
     if (NOT "${PYTHON_HOME}" STREQUAL "")
       file(TO_CMAKE_PATH "${PYTHON_HOME}" PYTHON_HOME)
@@ -53,26 +59,26 @@ if (NOT LLDB_DISABLE_PYTHON)
         file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/python27.lib" PYTHON_LIBRARY)
         file(TO_CMAKE_PATH "${PYTHON_HOME}/python27.dll" PYTHON_DLL)
       endif()
-      
+
       file(TO_CMAKE_PATH "${PYTHON_HOME}/Include" PYTHON_INCLUDE_DIR)
       if (NOT LLDB_RELOCATABLE_PYTHON)
         add_definitions( -DLLDB_PYTHON_HOME="${PYTHON_HOME}" )
       endif()
     else()
       message("Embedding Python on Windows without specifying a value for PYTHON_HOME is deprecated.  Support for this will be dropped soon.")
-        
+
       if ("${PYTHON_INCLUDE_DIR}" STREQUAL "" OR "${PYTHON_LIBRARY}" STREQUAL "")
         message("-- LLDB Embedded python disabled.  Embedding python on Windows requires "
                 "manually specifying PYTHON_INCLUDE_DIR *and* PYTHON_LIBRARY")
         set(LLDB_DISABLE_PYTHON 1)
       endif()
     endif()
-    
+
     if (PYTHON_LIBRARY)
       message("-- Found PythonLibs: ${PYTHON_LIBRARY}")
       include_directories(${PYTHON_INCLUDE_DIR})
     endif()
-    
+
   else()
     find_package(PythonLibs REQUIRED)
     include_directories(${PYTHON_INCLUDE_DIRS})
@@ -118,7 +124,7 @@ if( MSVC )
     -wd4521 # Suppress 'warning C4521: 'type' : multiple copy constructors specified'
     -wd4530 # Suppress 'warning C4530: C++ exception handler used, but unwind semantics are not enabled.'
   )
-endif() 
+endif()
 
 set(LLDB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
 set(LLDB_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})

Modified: lldb/branches/release_37/tools/lldb-server/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_37/tools/lldb-server/CMakeLists.txt?rev=242690&r1=242689&r2=242690&view=diff
==============================================================================
--- lldb/branches/release_37/tools/lldb-server/CMakeLists.txt (original)
+++ lldb/branches/release_37/tools/lldb-server/CMakeLists.txt Mon Jul 20 12:59:02 2015
@@ -42,7 +42,7 @@ else()
     )
 
   # The Darwin linker doesn't understand --start-group/--end-group.
-  if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
+  if (LLDB_LINKER_SUPPORTS_GROUPS)
     target_link_libraries(lldb-server
                           -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)
     target_link_libraries(lldb-server





More information about the llvm-branch-commits mailing list