Merge "Allow darwin targets to use -framework CoreFoundation."

am: 1c0ee4ab6e

Change-Id: I415f2263c2e8b1e7c39216289055dde2d0e21663
This commit is contained in:
Josh Gao
2016-09-01 21:30:23 +00:00
committed by android-build-merger
2 changed files with 4 additions and 4 deletions

View File

@@ -91,8 +91,8 @@ func CheckBadHostLdlibs(ctx ModuleContext, prop string, flags []string) {
flag = strings.TrimSpace(flag) flag = strings.TrimSpace(flag)
// TODO: Probably should just redo this property to prefix -l in Soong // TODO: Probably should just redo this property to prefix -l in Soong
if !strings.HasPrefix(flag, "-l") { if !strings.HasPrefix(flag, "-l") && !strings.HasPrefix(flag, "-framework") {
ctx.PropertyErrorf(prop, "Invalid flag: `%s`, must start with `-l`", flag) ctx.PropertyErrorf(prop, "Invalid flag: `%s`, must start with `-l` or `-framework`", flag)
} else if !inList(flag, allowed_ldlibs) { } else if !inList(flag, allowed_ldlibs) {
ctx.PropertyErrorf(prop, "Host library `%s` not available", flag) ctx.PropertyErrorf(prop, "Host library `%s` not available", flag)
} }

View File

@@ -91,14 +91,14 @@ var (
"10.11", "10.11",
} }
darwinAvailableLibraries = addPrefix([]string{ darwinAvailableLibraries = append(addPrefix([]string{
"c", "c",
"dl", "dl",
"m", "m",
"ncurses", "ncurses",
"pthread", "pthread",
"z", "z",
}, "-l") }, "-l"), "-framework CoreFoundation")
) )
const ( const (