aboutsummaryrefslogtreecommitdiffstats
path: root/cc/check.go
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2017-02-14 13:03:54 -0800
committerDan Willemsen <dwillemsen@google.com>2017-02-14 13:05:48 -0800
commit17ff63632227f021704f1b0a6b418a64d089a657 (patch)
treeec8e17d452e2813918ac34930d9064f5a1c352d8 /cc/check.go
parent581341d4f2752a1f2823173167d30ddb30db5932 (diff)
downloadbuild_soong-17ff63632227f021704f1b0a6b418a64d089a657.tar.gz
build_soong-17ff63632227f021704f1b0a6b418a64d089a657.tar.bz2
build_soong-17ff63632227f021704f1b0a6b418a64d089a657.zip
Ban --coverage now that we have native coverage
Bug: 32749731 Test: m -j Change-Id: Icb6ca0d846cba0ca842d3fb12dde1f1e8701cf5d
Diffstat (limited to 'cc/check.go')
-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" {