Forbid -fwhole_program_vtables

-fwhole_program_vtables depends on LTO being enabled. User manually
adding this through ldflag will break no LTO build configuration.

Test: TreeHugger
Change-Id: I557ec57831f01856a467f9567c3e7e25f8a6c566
This commit is contained in:
Yi Kong 2020-09-23 01:39:32 +08:00
parent c5a0e64d82
commit bc220ca803

View file

@ -38,6 +38,8 @@ func CheckBadCompilerFlags(ctx BaseModuleContext, prop string, flags []string) {
ctx.PropertyErrorf(prop, "Illegal flag `%s`", flag)
} else if flag == "--coverage" {
ctx.PropertyErrorf(prop, "Bad flag: `%s`, use native_coverage instead", flag)
} else if flag == "-fwhole-program-vtables" {
ctx.PropertyErrorf(prop, "Bad flag: `%s`, use whole_program_vtables 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. "+