aboutsummaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-02-15 20:58:49 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-02-15 20:58:49 +0000
commit31160bef1eefb34346927a6430a8da59d5e0d19f (patch)
tree1505d3204bd2d921a148e440d59c034f1fc05471 /cc
parenta48ab5b20707a313d80ceab0914f7dc49877563c (diff)
parent17ff63632227f021704f1b0a6b418a64d089a657 (diff)
downloadbuild_soong-31160bef1eefb34346927a6430a8da59d5e0d19f.tar.gz
build_soong-31160bef1eefb34346927a6430a8da59d5e0d19f.tar.bz2
build_soong-31160bef1eefb34346927a6430a8da59d5e0d19f.zip
Merge "Ban --coverage now that we have native coverage"
Diffstat (limited to 'cc')
-rw-r--r--cc/check.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cc/check.go b/cc/check.go
index 340464e4..d04b1459 100644
--- a/cc/check.go
+++ b/cc/check.go
@@ -36,6 +36,8 @@ func CheckBadCompilerFlags(ctx BaseModuleContext, prop string, flags []string) {
ctx.PropertyErrorf(prop, "Bad flag `%s`, use local_include_dirs or include_dirs instead", flag)
} else if inList(flag, config.IllegalFlags) {
ctx.PropertyErrorf(prop, "Illegal flag `%s`", flag)
+ } else if flag == "--coverage" {
+ ctx.PropertyErrorf(prop, "Bad flag: `%s`, use native_coverage instead", flag)
} else if strings.Contains(flag, " ") {
args := strings.Split(flag, " ")
if args[0] == "-include" {
@@ -73,6 +75,8 @@ func CheckBadLinkerFlags(ctx BaseModuleContext, prop string, flags []string) {
ctx.PropertyErrorf(prop, "Bad flag: `%s` is not allowed", flag)
} else if strings.HasPrefix(flag, "-Wl,--version-script") {
ctx.PropertyErrorf(prop, "Bad flag: `%s`, use version_script instead", flag)
+ } else if flag == "--coverage" {
+ ctx.PropertyErrorf(prop, "Bad flag: `%s`, use native_coverage instead", flag)
} else if strings.Contains(flag, " ") {
args := strings.Split(flag, " ")
if args[0] == "-z" {