This is an archive of the discontinued LLVM Phabricator instance.

Build a flat LLDB.framework for embedded Darwin targets
ClosedPublic

Authored by vsk on Aug 11 2020, 12:22 PM.

Details

Summary

This patch configures LLDB.framework to build as a flat unversioned
framework on non-macOS Darwin targets, which have never supported the
macOS framework layout.

This patch also renames the 'IOS' cmake variable to 'APPLE_EMBEDDED' to
reflect the fact that lldb is built for several different kinds of embedded
Darwin targets, not just iOS.

Diff Detail

Event Timeline

vsk created this revision.Aug 11 2020, 12:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2020, 12:22 PM
Herald added a subscriber: mgorny. · View Herald Transcript
vsk requested review of this revision.Aug 11 2020, 12:22 PM
JDevlieghere added inline comments.Aug 11 2020, 12:26 PM
lldb/cmake/modules/LLDBFramework.cmake
6–37

I think you should be able to do this.

vsk added inline comments.Aug 11 2020, 2:07 PM
lldb/cmake/modules/LLDBFramework.cmake
6–37

I've tried factoring out the value for the VERSION property in the past and, if memory serves, this resulted in an unusable framework on iOS. I'd rather hold off on this for now.

JDevlieghere accepted this revision.Aug 11 2020, 2:49 PM

Thanks!

lldb/cmake/modules/LLDBFramework.cmake
6–37

Alright, makes sense.

This revision is now accepted and ready to land.Aug 11 2020, 2:49 PM
This revision was automatically updated to reflect the committed changes.
smeenai added inline comments.
lldb/cmake/modules/LLDBFramework.cmake
142–147

This bit appears to have been introduced by this revision, without any equivalent existing before. This is causing issues for us when we build an LLDB framework in LLVM 12, because Versions/Current/XPCServices doesn't exist, so the created symlink is dangling. Is there some other target which should be creating that directory? (This is the only instance of XPCServices I see in LLDB's build.)

vsk added inline comments.Feb 26 2021, 5:28 PM
lldb/cmake/modules/LLDBFramework.cmake
142–147

Thanks for catching this. I'm curious how you spotted this. It looks like we do have a target that sets up this directory, but that it's not upstream. It should be safe to remove this; we can reapply the change downstream if that happens.

davide removed a reviewer: davide.Feb 26 2021, 5:34 PM
smeenai added inline comments.Mar 1 2021, 9:49 AM
lldb/cmake/modules/LLDBFramework.cmake
142–147

There's a part of our build/distribution infrastructure which checksums the built directory, and it failed for LLVM 12 because it tried to follow the dangling symlink. I put up D97701 to remove this; thanks!