[Lldb-commits] [lldb] 661fcfc - debugserver: Enable -DLLDB_ENERGY when compiling against an internal SDK
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 10 14:11:00 PDT 2020
Author: Adrian Prantl
Date: 2020-06-10T14:10:27-07:00
New Revision: 661fcfcd8afa4fbf4284a1ea8c0fc948dcc8fcac
URL: https://github.com/llvm/llvm-project/commit/661fcfcd8afa4fbf4284a1ea8c0fc948dcc8fcac
DIFF: https://github.com/llvm/llvm-project/commit/661fcfcd8afa4fbf4284a1ea8c0fc948dcc8fcac.diff
LOG: debugserver: Enable -DLLDB_ENERGY when compiling against an internal SDK
This brings over functionality from the xcodeproject that went missing during the CMake transition.
rdar://problem/63840635
Differential Revision: https://reviews.llvm.org/D81300
Added:
Modified:
lldb/tools/debugserver/source/CMakeLists.txt
Removed:
################################################################################
diff --git a/lldb/tools/debugserver/source/CMakeLists.txt b/lldb/tools/debugserver/source/CMakeLists.txt
index 151386d0c130..6c4fa026092b 100644
--- a/lldb/tools/debugserver/source/CMakeLists.txt
+++ b/lldb/tools/debugserver/source/CMakeLists.txt
@@ -129,6 +129,14 @@ if(LLDB_USE_ENTITLEMENTS)
endif()
endif()
+if($ENV{SDKROOT} MATCHES ".Internal.sdk$")
+ message(STATUS "LLDB debugserver energy support is enabled")
+ add_definitions(-DLLDB_ENERGY)
+ set(ENERGY_LIBRARY -lpmenergy -lpmsample)
+else()
+ message(STATUS "LLDB debugserver energy support is disabled")
+endif()
+
set(generated_mach_interfaces
${CMAKE_CURRENT_BINARY_DIR}/mach_exc.h
${CMAKE_CURRENT_BINARY_DIR}/mach_excServer.c
@@ -208,7 +216,8 @@ target_link_libraries(lldbDebugserverCommon
lldbDebugserverDarwin_DarwinLog
${FOUNDATION_LIBRARY}
${SECURITY_LIBRARY}
- ${LIBCOMPRESSION})
+ ${LIBCOMPRESSION}
+ ${ENERGY_LIBRARY})
if(HAVE_LIBCOMPRESSION)
set_property(TARGET lldbDebugserverCommon APPEND PROPERTY
COMPILE_DEFINITIONS HAVE_LIBCOMPRESSION)
More information about the lldb-commits
mailing list