Use CMAKE_OSX_SYSROOT instead of the environment variable SYSROOT

to detect energy support in debugserver.  The way that Swift
build-script is invoked the former may be overridden manually.

<rdar://problem/63840635>
This commit is contained in:
Adrian Prantl 2020-07-06 13:15:28 -07:00
parent 1b18391818
commit 60c07fd016
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ if(LLDB_USE_ENTITLEMENTS)
endif()
endif()
if($ENV{SDKROOT} MATCHES ".Internal.sdk$")
if(${CMAKE_OSX_SYSROOT} MATCHES ".Internal.sdk$")
message(STATUS "LLDB debugserver energy support is enabled")
add_definitions(-DLLDB_ENERGY)
set(ENERGY_LIBRARY -lpmenergy -lpmsample)