This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Fix LLDB_CODESIGN_IDENTITY logic.
ClosedPublic

Authored by hintonda on Feb 17 2018, 10:18 AM.

Details

Summary

Consolidate LLDB_CODESIGN_IDENTITY logic in one place and use
SKIP_DEBUGSERVER, which can be set independently, to control
codesigning targets.

Currently, running cmake the first time in a clean directory, without
passing -DLLDB_CODESIGN_IDENTITY='', fails. However, subsequent runs
succeed. That's because LLDB_CODESIGN_IDENTITY gets added to the
CACHE after the initial test. To fix that, the default value must be
set before it's tested.

Here's the error produced on the first run:

CMake Error at tools/lldb/tools/debugserver/source/CMakeLists.txt:215 (add_custom_command):

No TARGET 'debugserver' has been created in this directory.

Diff Detail

Repository
rL LLVM

Event Timeline

hintonda created this revision.Feb 17 2018, 10:18 AM
vsk accepted this revision.Feb 17 2018, 11:01 AM

Thanks, lgtm!

This revision is now accepted and ready to land.Feb 17 2018, 11:01 AM
This revision was automatically updated to reflect the committed changes.

This is causing test failures due debugserver not found. The fix should be to add DEBUGSERVER_PATH to the cache -- it was originally available in the root scope.

I hope to have a fix in as soon as I validated the fix locally, but if this is causing an issue for anyone, please let me know and I'll revert.