This is an archive of the discontinued LLVM Phabricator instance.

[clang-tools-extra] [cmake] Link against libclang-cpp whenever possible
ClosedPublic

Authored by mgorny on Oct 4 2019, 12:34 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

mgorny created this revision.Oct 4 2019, 12:34 AM

I don't think I can review that but I do appreciate the feature!
Maybe we should make that explicit in the release notes?

mgorny added a comment.Oct 4 2019, 1:13 AM

What do you mean by 'feature'? clang-cpp library or clang_target_link_libraries function?

More dynamic, less static usage :)

beanz accepted this revision.Oct 4 2019, 1:14 PM

LGTM.

This revision is now accepted and ready to land.Oct 4 2019, 1:14 PM
beanz added a comment.Oct 4 2019, 1:18 PM

More dynamic, less static usage :)

More dynamic, less static isn't always a good thing. It saves disk space at the expense of performance. The option that controls this is CLANG_LINK_CLANG_DYLIB, which is mentioned in the clang 9.0 release notes.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2019, 1:29 PM

More dynamic, less static isn't always a good thing. It saves disk space at the expense of performance. The option that controls this is CLANG_LINK_CLANG_DYLIB, which is mentioned in the clang 9.0 release notes.

Sure :)
For example, for a full build of llvm-toolchain, all the packages size drop from 510M to 278M