From 5226a2a6de669225e60147ac5ebb7f7e7118a3ba Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 6 Sep 2017 20:15:43 +0000 Subject: [PATCH] [CMake] Need to set WITH_LOCKDOWN on debugserver target Turns out WITH_LOCKDOWN define changes the struct layout and constructor implementation for RNBSocket which is used in debugserver.cpp, so we need to make sure this is consistent. In the future we should change WITH_LOCKDOWN to be configured in a generated header, but for now we can just set it correctly. llvm-svn: 312666 --- lldb/tools/debugserver/source/CMakeLists.txt | 5 +++++ lldb/unittests/debugserver/CMakeLists.txt | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/lldb/tools/debugserver/source/CMakeLists.txt b/lldb/tools/debugserver/source/CMakeLists.txt index 65bdb9898334..d99880cd97f3 100644 --- a/lldb/tools/debugserver/source/CMakeLists.txt +++ b/lldb/tools/debugserver/source/CMakeLists.txt @@ -149,6 +149,11 @@ if(NOT SKIP_DEBUGSERVER) WITH_FBS WITH_BKS ) + set_property(TARGET debugserver APPEND PROPERTY COMPILE_DEFINITIONS + WITH_LOCKDOWN + WITH_FBS + WITH_BKS + ) set_property(TARGET lldbDebugserverCommon APPEND PROPERTY COMPILE_FLAGS -F${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks ) diff --git a/lldb/unittests/debugserver/CMakeLists.txt b/lldb/unittests/debugserver/CMakeLists.txt index cfb520a0dc76..adb8fb00ddac 100644 --- a/lldb/unittests/debugserver/CMakeLists.txt +++ b/lldb/unittests/debugserver/CMakeLists.txt @@ -17,3 +17,22 @@ add_lldb_unittest(debugserverTests LINK_COMPONENTS Support ) + +if(IOS) + set_property(TARGET debugserverTests APPEND PROPERTY COMPILE_DEFINITIONS + WITH_LOCKDOWN + WITH_FBS + WITH_BKS + ) + + add_lldb_unittest(debugserverNonUITests + RNBSocketTest.cpp + debugserver_LogCallback.cpp + + LINK_LIBS + lldbDebugserverCommon_NonUI + lldbHost + LINK_COMPONENTS + Support + ) +endif()