aboutsummaryrefslogtreecommitdiffstats
path: root/androidmk
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-09-26 15:45:04 -0700
committerDan Willemsen <dwillemsen@google.com>2016-10-31 16:21:01 -0700
commita03cf6d3221142a7d38fefb187728a084f0b0367 (patch)
treeb048c310fd53cdc60f1452d97671377167da409d /androidmk
parent5cb580f407d2b1b639d7aeea8e1310740e55fe1c (diff)
downloadbuild_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 'androidmk')
-rw-r--r--androidmk/cmd/androidmk/android.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go
index 1fac4bf8..6387ff1b 100644
--- a/androidmk/cmd/androidmk/android.go
+++ b/androidmk/cmd/androidmk/android.go
@@ -53,6 +53,9 @@ var standardProperties = map[string]struct {
"LOCAL_EXPORT_SHARED_LIBRARY_HEADERS": {"export_shared_lib_headers", bpparser.ListType},
"LOCAL_EXPORT_STATIC_LIBRARY_HEADERS": {"export_static_lib_headers", bpparser.ListType},
"LOCAL_INIT_RC": {"init_rc", bpparser.ListType},
+ "LOCAL_TIDY_FLAGS": {"tidy_flags", bpparser.ListType},
+ // TODO: This is comma-seperated, not space-separated
+ "LOCAL_TIDY_CHECKS": {"tidy_checks", bpparser.ListType},
"LOCAL_JAVA_RESOURCE_DIRS": {"java_resource_dirs", bpparser.ListType},
"LOCAL_JAVACFLAGS": {"javacflags", bpparser.ListType},
@@ -73,6 +76,7 @@ var standardProperties = map[string]struct {
"LOCAL_RTTI_FLAG": {"rtti", bpparser.BoolType},
"LOCAL_NO_STANDARD_LIBRARIES": {"no_standard_libraries", bpparser.BoolType},
"LOCAL_PACK_MODULE_RELOCATIONS": {"pack_relocations", bpparser.BoolType},
+ "LOCAL_TIDY": {"tidy", bpparser.BoolType},
"LOCAL_EXPORT_PACKAGE_RESOURCES": {"export_package_resources", bpparser.BoolType},
}