diff options
author | Dan Willemsen <dwillemsen@google.com> | 2016-05-25 14:47:21 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2016-05-25 17:50:05 -0700 |
commit | 20acc5c520c8d6021824b3f839000db45be36a6e (patch) | |
tree | ca1698bd3e5f55b3128a595cf1b4f91bfc0ab24a /Android.bp | |
parent | b36ab1a1a0355d15d692e2b6ff5955cae1275174 (diff) | |
download | build_soong-20acc5c520c8d6021824b3f839000db45be36a6e.tar.gz build_soong-20acc5c520c8d6021824b3f839000db45be36a6e.tar.bz2 build_soong-20acc5c520c8d6021824b3f839000db45be36a6e.zip |
Add flag property checking
Some checks for common errors with user-provided compiler and linker
flags:
* Using -I instead of include_dirs
* Using -l<lib> in ldflags instead of host_ldlibs (or shared_libs)
* Using -L in ldflags
* Splitting a multi-word flag into two flags
* Combining two flags into one list entry
* Using a path that could search outside the source or output trees
* Using a non-whitelisted library in host_ldlibs
Maybe some of the flag checks should happen during a static analysis
pass, but we don't have one right now, and this only adds ~1/2 second to
our 73 second Mega_device runs (recompile the changed code, run
soong_build, then report unknown target).
Change-Id: Icea7436260f1caa62c0cec29817a1cfea27b3e7c
Diffstat (limited to 'Android.bp')
-rw-r--r-- | Android.bp | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -125,6 +125,7 @@ bootstrap_go_package { "cc/androidmk.go", "cc/builder.go", "cc/cc.go", + "cc/check.go", "cc/clang.go", "cc/gen.go", "cc/makevars.go", |