Page MenuHomePhabricator

[CMake] Prevent lldbDebugserverCommon from building if you disable debugserver builds
ClosedPublic

Authored by xiaobai on Jan 15 2019, 5:18 PM.

Details

Summary

The flags LLDB_USE_SYSTEM_DEBUGSERVER and LLDB_NO_DEBUGSERVER were
introduced to the debugserver build. If one of these two flags are set, then we
do not build and sign debugserver. However I noticed that we were still building
the lldbDebugserverCommon and lldbDebugserverCommon_NonUI libraries regardless
of whether or not these flags were set. I don't believe we should be building
these libraries unless we are building and signing debugserver.

Diff Detail

Repository
rLLDB LLDB

Event Timeline

xiaobai created this revision.Jan 15 2019, 5:18 PM

Yes this sounds very reasonable.

One little detail is, that on Darwin the debugserverTests unit test target depends on lldbDebugserverCommon.
In unittests/CMakeLists.txt it's included if(LLDB_CAN_USE_DEBUGSERVER), which should be changed to if(NOT SKIP_TEST_DEBUGSERVER) now. IIUC this would make sense anyway.

xiaobai updated this revision to Diff 182131.Jan 16 2019, 1:17 PM

Modified unittests/CMakeLists.txt to reflect this change.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 17 2019, 3:17 PM
This revision was automatically updated to reflect the committed changes.