Add -z to valid multi-word linker flags

Art uses -z muldefs, allow it to be passed as a property.

Change-Id: Ief3b252d4b84762dbd49766ecdbebe00b333f523
This commit is contained in:
Colin Cross
2016-09-07 13:15:25 -07:00
parent 522e373a22
commit 42d1ba2d92

View File

@@ -74,7 +74,14 @@ func CheckBadLinkerFlags(ctx BaseModuleContext, prop string, flags []string) {
} else if strings.HasPrefix(flag, "-Wl,--version-script") {
ctx.PropertyErrorf(prop, "Bad flag: `%s`, use version_script instead", 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)
}
}
}
}