[Lldb-commits] [PATCH] Default to linking lldb-server statically for Android.
Chaoren Lin
chaorenl at google.com
Tue Jun 30 18:10:51 PDT 2015
Hi tberghammer, vharron,
http://reviews.llvm.org/D10858
Files:
cmake/LLDBDependencies.cmake
cmake/platforms/Android.cmake
Index: cmake/LLDBDependencies.cmake
===================================================================
--- cmake/LLDBDependencies.cmake
+++ cmake/LLDBDependencies.cmake
@@ -154,7 +154,12 @@
list(APPEND LLDB_SYSTEM_LIBS ${system_libs})
if (LLVM_BUILD_STATIC)
- list(APPEND LLDB_SYSTEM_LIBS python2.7 z util termcap gpm ssl crypto bsd)
+ 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( LLVM_LINK_COMPONENTS
Index: cmake/platforms/Android.cmake
===================================================================
--- cmake/platforms/Android.cmake
+++ cmake/platforms/Android.cmake
@@ -38,6 +38,10 @@
set( ANDROID True )
set( __ANDROID_NDK__ True )
+if (NOT DEFINED LLVM_BUILD_STATIC)
+ set( LLVM_BUILD_STATIC True )
+endif()
+
set( ANDROID_ABI "${ANDROID_ABI}" CACHE INTERNAL "Android Abi" FORCE )
if( ANDROID_ABI STREQUAL "x86" )
set( CMAKE_SYSTEM_PROCESSOR "i686" )
@@ -95,11 +99,6 @@
set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv7-a" )
endif()
-# PIE is required for API 21+ so we enable it
-# unfortunately, it is not supported before API 14 so we need to do something else there
-# see http://llvm.org/pr23457
-set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -pie -fPIE" )
-
# linker flags
set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fdata-sections -ffunction-sections" )
set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--gc-sections" )
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10858.28835.patch
Type: text/x-patch
Size: 1528 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150701/caf3c513/attachment.bin>
More information about the lldb-commits
mailing list