diff options
author | Dan Willemsen <dwillemsen@google.com> | 2016-09-26 15:45:04 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2016-10-31 16:21:01 -0700 |
commit | a03cf6d3221142a7d38fefb187728a084f0b0367 (patch) | |
tree | b048c310fd53cdc60f1452d97671377167da409d /Android.bp | |
parent | 5cb580f407d2b1b639d7aeea8e1310740e55fe1c (diff) | |
download | build_soong-a03cf6d3221142a7d38fefb187728a084f0b0367.tar.gz build_soong-a03cf6d3221142a7d38fefb187728a084f0b0367.tar.bz2 build_soong-a03cf6d3221142a7d38fefb187728a084f0b0367.zip |
Add clang-tidy support
For every file which we can run clang-tidy (C/C++ clang-built), we add a
new build node that depends on the object file (since clang-tidy does
not export a depfile), and is depended on by the link step. This is
better than how we're doing it in make, since calling tidy can be turned
on or off without needing to rebuild the object files.
This does not attempt to port WITH_TIDY_ONLY from Make, since the way
that it works is broken (due to the lack of a depfile).
Bug: 32244182
Test: WITH_TIDY=true mmma -j bionic/libc
Test: ./soong (Setting ClangTidy: true)
Change-Id: I40bbb5bb00d292d72bf1c293b93080b5f9f6d8ea
Diffstat (limited to 'Android.bp')
-rw-r--r-- | Android.bp | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -95,6 +95,7 @@ bootstrap_go_package { srcs: [ "cc/config/clang.go", "cc/config/global.go", + "cc/config/tidy.go", "cc/config/toolchain.go", "cc/config/arm_device.go", @@ -108,6 +109,9 @@ bootstrap_go_package { "cc/config/x86_linux_host.go", "cc/config/x86_windows_host.go", ], + testSrcs: [ + "cc/config/tidy_test.go", + ], } bootstrap_go_package { @@ -134,6 +138,7 @@ bootstrap_go_package { "cc/sanitize.go", "cc/stl.go", "cc/strip.go", + "cc/tidy.go", "cc/util.go", "cc/compiler.go", |