Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39ef52f1 authored by Colin Cross's avatar Colin Cross
Browse files

Forbid -Weverything

Use of -Weverything blocks build system changes and toolchain updates
on new warnings.  Forbid it in the build system.  Developers can
experiment with -Weverything on their module by adding it to their
Android.bp file and building with
m ANDROID_TEMPORARILY_ALLOW_WEVERYTHING=true

Fixes: 143713277
Test: manual
Change-Id: If154db328c52f687161e7a41e486d56a129850ac
parent 38dec1bc
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -38,6 +38,11 @@ func CheckBadCompilerFlags(ctx BaseModuleContext, prop string, flags []string) {
			ctx.PropertyErrorf(prop, "Illegal flag `%s`", flag)
			ctx.PropertyErrorf(prop, "Illegal flag `%s`", flag)
		} else if flag == "--coverage" {
		} else if flag == "--coverage" {
			ctx.PropertyErrorf(prop, "Bad flag: `%s`, use native_coverage instead", flag)
			ctx.PropertyErrorf(prop, "Bad flag: `%s`, use native_coverage instead", flag)
		} else if flag == "-Weverything" {
			if !ctx.Config().IsEnvTrue("ANDROID_TEMPORARILY_ALLOW_WEVERYTHING") {
				ctx.PropertyErrorf(prop, "-Weverything is not allowed in Android.bp files.  "+
					"Build with `m ANDROID_TEMPORARILY_ALLOW_WEVERYTHING=true` to experiment locally with -Weverything.")
			}
		} else if strings.Contains(flag, " ") {
		} else if strings.Contains(flag, " ") {
			args := strings.Split(flag, " ")
			args := strings.Split(flag, " ")
			if args[0] == "-include" {
			if args[0] == "-include" {