Add -z to valid multi-word linker flags am: 42d1ba2d92

am: 813c97d8d9

Change-Id: Id9ec4ffec4a546884fa083dcb1eebfc279578ea4
This commit is contained in:
Colin Cross
2016-09-07 21:18:14 +00:00
committed by android-build-merger

View File

@@ -74,7 +74,14 @@ func CheckBadLinkerFlags(ctx BaseModuleContext, prop string, flags []string) {
} else if strings.HasPrefix(flag, "-Wl,--version-script") { } else if strings.HasPrefix(flag, "-Wl,--version-script") {
ctx.PropertyErrorf(prop, "Bad flag: `%s`, use version_script instead", flag) ctx.PropertyErrorf(prop, "Bad flag: `%s`, use version_script instead", flag)
} else if strings.Contains(flag, " ") { } else if strings.Contains(flag, " ") {
ctx.PropertyErrorf(prop, "Bad flag: `%s` is not an allowed multi-word flag. Should it be split into multiple flags?", flag) args := strings.Split(flag, " ")
if args[0] == "-z" {
if len(args) > 2 {
ctx.PropertyErrorf(prop, "`-z` only takes one argument: `%s`", flag)
}
} else {
ctx.PropertyErrorf(prop, "Bad flag: `%s` is not an allowed multi-word flag. Should it be split into multiple flags?", flag)
}
} }
} }
} }