summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-10-27 16:27:34 +0000
committerPavel Labath <labath@google.com>2017-10-27 16:47:04 +0000
commit5c234206d589d8897fbb4c25b6d5e9ce1df792b1 (patch)
tree3e57e539169ec02dc0bdcfa23a8fa32f12df74e0
parentd6d599034346e4198278f833e290a537b48c9e62 (diff)
downloadlldb-utils-5c234206d589d8897fbb4c25b6d5e9ce1df792b1.tar.gz
Reapply "Make lldb-server to be dynamic, position independent and use LLVM libc++"
The build was failing due to the use-after free in TCP connection url handling, which only manifested itself when using libc++. That should be fixed now. This reverts commit 16671772375b883668ec01d4a78e92b4bd7fdef3. Change-Id: If094431e7446bdf69ac24de8496355fce22f0525
-rw-r--r--config/android.cmake9
1 files changed, 5 insertions, 4 deletions
diff --git a/config/android.cmake b/config/android.cmake
index f0533a2..541db50 100644
--- a/config/android.cmake
+++ b/config/android.cmake
@@ -7,9 +7,9 @@ set(CMAKE_INSTALL_PREFIX "" CACHE STRING "Installation prefix")
set(LLVM_TARGET_ARCH ${LLVM_TARGET_ARCH} CACHE STRING "X86, ARM, Aarch64, Mips")
set(LLVM_HOST_TRIPLE ${LLVM_HOST_TRIPLE_ARCH}-unknown-linux-android
CACHE STRING "{i386,x86_64,armeabi,aarch64,mips,mips64}-unknown-linux-android")
-set(LLVM_BUILD_STATIC TRUE CACHE BOOL "Statically link executables")
+set(LLVM_BUILD_STATIC FALSE CACHE BOOL "Statically link executables")
set(LLVM_USE_LINKER ${LLVM_USE_LINKER} CACHE STRING "bfd, gold")
-set(LLVM_ENABLE_PIC FALSE CACHE BOOL "Enable position independent code")
+set(LLVM_ENABLE_PIC TRUE CACHE BOOL "Enable position independent code")
set(LLVM_TARGETS_TO_BUILD ${LLVM_TARGET_ARCH} CACHE STRING "X86, ARM, AArch64, Mips")
set(CROSS_TOOLCHAIN_FLAGS_NATIVE
@@ -19,10 +19,11 @@ set(CROSS_TOOLCHAIN_FLAGS_NATIVE
# Configure the toolchain file
set(ANDROID_ABI ${ANDROID_ABI}
CACHE STRING "armeabi, armeabi-v7a, arm64-v8a, x86, x86_64, mips, mips64")
-set(ANDROID_PLATFORM android-21 CACHE STRING "Android platform")
+set(ANDROID_PLATFORM android-16 CACHE STRING "Android platform")
set(ANDROID_ALLOW_UNDEFINED_SYMBOLS ON
CACHE BOOL "Allow undefined symbols when linking shared libraries")
-set(ANDROID_PIE FALSE CACHE BOOL "Enable position independent executables")
+set(ANDROID_PIE TRUE CACHE BOOL "Enable position independent executables")
+set(ANDROID_STL "c++_static" CACHE STRING "Use LLVM libc++")
# LLVM is unable to detect <atomic> presence properly on NDK r14 (b/37654339).
# This is needed to help it along.