diff options
Diffstat (limited to 'cmake/modules/LLDBConfig.cmake')
-rw-r--r-- | cmake/modules/LLDBConfig.cmake | 53 |
1 files changed, 41 insertions, 12 deletions
diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake index 74d6e74b0cfd..79e82fbb3fb1 100644 --- a/cmake/modules/LLDBConfig.cmake +++ b/cmake/modules/LLDBConfig.cmake @@ -13,14 +13,12 @@ endif() if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) set(LLDB_DEFAULT_DISABLE_PYTHON 0) set(LLDB_DEFAULT_DISABLE_CURSES 1) +elseif (CMAKE_SYSTEM_NAME MATCHES "Android" ) + set(LLDB_DEFAULT_DISABLE_PYTHON 1) + set(LLDB_DEFAULT_DISABLE_CURSES 1) else() - if ( __ANDROID_NDK__ ) - set(LLDB_DEFAULT_DISABLE_PYTHON 1) - set(LLDB_DEFAULT_DISABLE_CURSES 1) - else() - set(LLDB_DEFAULT_DISABLE_PYTHON 0) - set(LLDB_DEFAULT_DISABLE_CURSES 0) - endif() + set(LLDB_DEFAULT_DISABLE_PYTHON 0) + set(LLDB_DEFAULT_DISABLE_CURSES 0) endif() set(LLDB_DISABLE_PYTHON ${LLDB_DEFAULT_DISABLE_PYTHON} CACHE BOOL @@ -31,6 +29,9 @@ set(LLDB_DISABLE_CURSES ${LLDB_DEFAULT_DISABLE_CURSES} CACHE BOOL set(LLDB_RELOCATABLE_PYTHON 0 CACHE BOOL "Causes LLDB to use the PYTHONHOME environment variable to locate Python.") +set(LLDB_USE_SYSTEM_SIX 0 CACHE BOOL + "Use six.py shipped with system and do not install a copy of it") + if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") set(LLDB_EXPORT_ALL_SYMBOLS 0 CACHE BOOL "Causes lldb to export all symbols when building liblldb.") @@ -269,8 +270,8 @@ string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" LLDB_VERSION message(STATUS "LLDB version: ${LLDB_VERSION}") include_directories(BEFORE - ${CMAKE_CURRENT_BINARY_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include + ${CMAKE_CURRENT_BINARY_DIR}/include ) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) @@ -280,6 +281,17 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE + PATTERN ".cmake" EXCLUDE + PATTERN "Config.h" EXCLUDE + ) + + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ + COMPONENT lldb_headers + DESTINATION include + FILES_MATCHING + PATTERN "*.h" + PATTERN ".svn" EXCLUDE + PATTERN ".cmake" EXCLUDE ) endif() @@ -354,10 +366,7 @@ endif() # Figure out if lldb could use lldb-server. If so, then we'll # ensure we build lldb-server when an lldb target is being built. -if ((CMAKE_SYSTEM_NAME MATCHES "Darwin") OR - (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") OR - (CMAKE_SYSTEM_NAME MATCHES "Linux") OR - (CMAKE_SYSTEM_NAME MATCHES "NetBSD")) +if (CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD") set(LLDB_CAN_USE_LLDB_SERVER 1) else() set(LLDB_CAN_USE_LLDB_SERVER 0) @@ -417,4 +426,24 @@ if(LLDB_USE_BUILTIN_DEMANGLER) add_definitions(-DLLDB_USE_BUILTIN_DEMANGLER) endif() +if ((CMAKE_SYSTEM_NAME MATCHES "Android") AND LLVM_BUILD_STATIC AND + ((ANDROID_ABI MATCHES "armeabi") OR (ANDROID_ABI MATCHES "mips"))) + add_definitions(-DANDROID_USE_ACCEPT_WORKAROUND) +endif() + find_package(Backtrace) + +check_include_file(termios.h HAVE_TERMIOS_H) + +# These checks exist in LLVM's configuration, so I want to match the LLVM names +# so that the check isn't duplicated, but we translate them into the LLDB names +# so that I don't have to change all the uses at the moment. +set(LLDB_CONFIG_TERMIOS_SUPPORTED ${HAVE_TERMIOS_H}) +if(NOT UNIX) + set(LLDB_DISABLE_POSIX 1) +endif() + +# This should be done at the end +configure_file( + ${LLDB_INCLUDE_ROOT}/lldb/Host/Config.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/include/lldb/Host/Config.h) |