I got around to checking with cmake and it doesn't seems to be affected. I did 
have to add one small fix to make it build (included here), but other than that 
it went through fine. If there's no further problems, I'll commit this soon 
then.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D5431

Files:
  lib/Makefile
  scripts/CMakeLists.txt
  tools/lldb-mi/Makefile

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: lib/Makefile
===================================================================
--- lib/Makefile
+++ lib/Makefile
@@ -180,7 +180,7 @@
     # Don't allow unresolved symbols.
     LLVMLibsOptions += -Wl,--no-undefined
     # Link in python
-    LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -ledit -lncurses -lpanel
+    LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -ledit -lncurses -lpanel -lpthread
     LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT)
 endif
 
@@ -192,5 +192,5 @@
     LLVMLibsOptions += -Wl,--allow-shlib-undefined
     # Link in python
     LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -L/usr/local/lib -lexecinfo \
-                       -ledit -lncurses -lpanel
+                       -ledit -lncurses -lpanel -lpthread
 endif
Index: scripts/CMakeLists.txt
===================================================================
--- scripts/CMakeLists.txt
+++ scripts/CMakeLists.txt
@@ -1,49 +1,51 @@
-set(LLVM_NO_RTTI 1)
+if (NOT LLDB_DISABLE_PYTHON)
+	set(LLVM_NO_RTTI 1)
 
-file(GLOB SWIG_INPUTS Python/interface/*.i)
+	file(GLOB SWIG_INPUTS Python/interface/*.i)
 
-if ( LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION )
-	find_package(SWIG REQUIRED)
-	add_custom_command(
-	  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
-	  DEPENDS ${LLDB_SOURCE_DIR}/scripts/lldb.swig
-	  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/buildSwigWrapperClasses.py
-	  DEPENDS ${SWIG_INPUTS}
-	  COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/buildSwigWrapperClasses.py "--srcRoot=${LLDB_SOURCE_DIR}" "--targetDir=${CMAKE_CURRENT_BINARY_DIR}" "--cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}" "--prefix=${CMAKE_BINARY_DIR}" "--swigExecutable=${SWIG_EXECUTABLE}" -m
-	  COMMENT "Python script building LLDB Python wrapper")  
-	set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp PROPERTIES GENERATED 1)
+	if ( LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION )
+		find_package(SWIG REQUIRED)
+		add_custom_command(
+		  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
+		  DEPENDS ${LLDB_SOURCE_DIR}/scripts/lldb.swig
+		  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/buildSwigWrapperClasses.py
+		  DEPENDS ${SWIG_INPUTS}
+		  COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/buildSwigWrapperClasses.py "--srcRoot=${LLDB_SOURCE_DIR}" "--targetDir=${CMAKE_CURRENT_BINARY_DIR}" "--cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}" "--prefix=${CMAKE_BINARY_DIR}" "--swigExecutable=${SWIG_EXECUTABLE}" -m
+		  COMMENT "Python script building LLDB Python wrapper")  
+		set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp PROPERTIES GENERATED 1)
 
-	ADD_CUSTOM_TARGET(swig_wrapper ALL echo -n
-		DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
-		)
+		ADD_CUSTOM_TARGET(swig_wrapper ALL echo -n
+			DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
+			)
 
-	# Install the LLDB python module on all operating systems (except Windows)
-	if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
-	  install(DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
-		DESTINATION lib${LLVM_LIBDIR_SUFFIX})
-	endif()
-else ()
-	add_custom_command(
-	  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
-	  DEPENDS ${LLDB_SOURCE_DIR}/scripts/lldb.swig
-	  DEPENDS ${SWIG_INPUTS}
-	  # swig was directly invoked on Windows (where the Python API is not being generated) but on other platforms, we need to run the *swig-wrapper-classes.sh shell-scripts.
-	  #COMMAND swig -c++ -shadow -python -I${LLDB_SOURCE_DIR}/include -I./. -outdir ${LLDB_SOURCE_DIR}/scripts/Python  -o ${LLDB_SOURCE_DIR}/source/LLDBWrapPython.cpp ${LLDB_SOURCE_DIR}/scripts/lldb.swig
-	  COMMAND env PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build-swig-wrapper-classes.sh ${LLDB_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} -m
-	  COMMAND env PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/finish-swig-wrapper-classes.sh ${LLDB_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} -m
-	  COMMENT "Building lldb python wrapper")
-	set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp PROPERTIES GENERATED 1)
+		# Install the LLDB python module on all operating systems (except Windows)
+		if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
+		  install(DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
+			DESTINATION lib${LLVM_LIBDIR_SUFFIX})
+		endif()
+	else ()
+		add_custom_command(
+		  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
+		  DEPENDS ${LLDB_SOURCE_DIR}/scripts/lldb.swig
+		  DEPENDS ${SWIG_INPUTS}
+		  # swig was directly invoked on Windows (where the Python API is not being generated) but on other platforms, we need to run the *swig-wrapper-classes.sh shell-scripts.
+		  #COMMAND swig -c++ -shadow -python -I${LLDB_SOURCE_DIR}/include -I./. -outdir ${LLDB_SOURCE_DIR}/scripts/Python  -o ${LLDB_SOURCE_DIR}/source/LLDBWrapPython.cpp ${LLDB_SOURCE_DIR}/scripts/lldb.swig
+		  COMMAND env PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build-swig-wrapper-classes.sh ${LLDB_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} -m
+		  COMMAND env PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/finish-swig-wrapper-classes.sh ${LLDB_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} -m
+		  COMMENT "Building lldb python wrapper")
+		set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp PROPERTIES GENERATED 1)
 
-	ADD_CUSTOM_TARGET(swig_wrapper ALL echo -n
-		DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
-		)
+		ADD_CUSTOM_TARGET(swig_wrapper ALL echo -n
+			DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
+			)
 
-	# Install the LLDB python module on all operating systems (except Windows)
-	if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
-	  install(DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
-		DESTINATION lib${LLVM_LIBDIR_SUFFIX})
-	endif()
-endif ()
+		# Install the LLDB python module on all operating systems (except Windows)
+		if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
+		  install(DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
+			DESTINATION lib${LLVM_LIBDIR_SUFFIX})
+		endif()
+	endif ()
 
-# build Python modules
-add_subdirectory(Python/modules)
+	# build Python modules
+	add_subdirectory(Python/modules)
+endif()
Index: tools/lldb-mi/Makefile
===================================================================
--- tools/lldb-mi/Makefile
+++ tools/lldb-mi/Makefile
@@ -22,11 +22,11 @@
 endif
 
 ifneq (,$(filter $(HOST_OS), Linux GNU/kFreeBSD))
-	LLVMLibsOptions += -Wl,-rpath,$(LibDir)
+	LLVMLibsOptions += -Wl,-rpath,$(LibDir) -lpthread
 endif
 
 ifeq ($(HOST_OS),FreeBSD)
 	CPP.Flags += -I/usr/include/edit #-v
-	LLVMLibsOptions += -Wl,-rpath,$(LibDir)
+	LLVMLibsOptions += -Wl,-rpath,$(LibDir) -lpthread
 endif
 
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to