This is an archive of the discontinued LLVM Phabricator instance.

Remove ASTContexts from SystemInitializerCommon
ClosedPublic

Authored by labath on May 13 2016, 6:24 AM.

Details

Summary

The AST contexts are not needed in the server components, and the clang context in particular
pulls in large parts of clang into the binary. Simply removing these two calls reduces the
lldb-server size by about 50%--80%, depending on the architecture and build type.

This should not impact the client parts as the same calls are already present in
SystemInitializerFull.

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 57171.May 13 2016, 6:24 AM
labath retitled this revision from to Remove ASTContexts from SystemInitializerCommon.
labath updated this object.
labath added reviewers: tberghammer, clayborg.
labath added a subscriber: lldb-commits.
tberghammer accepted this revision.May 13 2016, 6:35 AM
tberghammer edited edge metadata.

Very nice!

I don't know how we missed this optimization before. Finally the size of lldb-server starts to became more reasonable (3.7 MB on arm32)

This revision is now accepted and ready to land.May 13 2016, 6:35 AM
This revision was automatically updated to reflect the committed changes.