This is an archive of the discontinued LLVM Phabricator instance.

Add a flag that controls if clang-tidy and clang-include-fixer are built into libclang.
ClosedPublic

Authored by thakis on May 7 2020, 2:10 PM.

Details

Summary

Based on the discussion on D55415, also make the flag default to false.
Having libclang depend on clang-tools-extra means check-clang builds all
of clang-tools-extra, which besides being a layering violation takes
quite some time, since clang-tools-extra has many files that are slow
to compile.

Longer term, we likely will want to remove this flag completely. If
people need this functionality, maybe there could be a
libclang-tools-extra that's libclang + clang-tidy and
clang-includes-fixer linked in.

Diff Detail

Event Timeline

thakis created this revision.May 7 2020, 2:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 7 2020, 2:10 PM
hans accepted this revision.May 8 2020, 7:49 AM
hans added a subscriber: hans.

Looks very reasonable to be. Maybe worth a release note in case this is surprising to any libclang users? And maybe cc the other folks from D55415?

clang/tools/libclang/CMakeLists.txt
65

Isn't it LLVM_ENABLE_PROJECTS?

This revision is now accepted and ready to land.May 8 2020, 7:49 AM
thakis marked 2 inline comments as done.May 8 2020, 8:39 AM

Thanks! Added a release note. I had cc'd everyone who had commented on D55415 -- did I miss anyone?

clang/tools/libclang/CMakeLists.txt
65

Err, yes. Done.

This revision was automatically updated to reflect the committed changes.
thakis marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptMay 8 2020, 9:05 AM