Page MenuHomePhabricator

[libc builder] Add custom step to run clang-tidy.

Authored by PaulkaToast on Mar 28 2020, 1:11 AM.



By running this on the buildbot, we ensure that clang-tidy rules are being enforced without having to burden developers with building all of clang.

Event Timeline

PaulkaToast created this revision.Mar 28 2020, 1:11 AM
PaulkaToast edited the summary of this revision. (Show Details)Mar 28 2020, 1:15 AM
abrachet added inline comments.

I think to use sanitizers we need to build compiler-rt too.

PaulkaToast marked 2 inline comments as done.Mar 30 2020, 2:12 PM
PaulkaToast added inline comments.

We don't build libc with the clang we compile. We compile clang-tidy because our new checks have not released yet so its not present in the system clang, unlike the sanitizes.

sivachandra marked an inline comment as done.Mar 30 2020, 2:43 PM
sivachandra added inline comments.

Adding clang and clang-tools-extra makes sense ...


But, running clang tidy should be driven by our build rules.

sivachandra added inline comments.Mar 30 2020, 2:48 PM

I would actually add that not all builders should run clang tidy. We should have an implementation standard checker builder which runs clang-tidy as part of building everything under llvmlibc. This builder should not run tests. This scheme will allow us to reduce builder cycle time. About how to do this, we can drive it via some CMake option: default behavior is to run clang-tidy as part of our build rules, while on all but one builder we disable implementation standard checking via the CMake option.

PaulkaToast abandoned this revision.May 5 2020, 10:28 PM
PaulkaToast marked an inline comment as done.

No longer needed as this is achieved with cmake rules.