Fix Android.mk LOCAL_EXPORT_C_INCLUDE_DIRS generation

We were keeping the original array, and adding duplicates with -I
removed. Instead, only add entries that start with -I, but continue
stripping that off. This removes the -isystem arguments from the NDK
libraries.

Change-Id: I8fd71bbd6b7a051aad7e80a92a05dbdc05a6b87a
This commit is contained in:
Dan Willemsen 2016-05-05 15:11:48 -07:00
parent 66187d987c
commit 3b1fffa33b
1 changed files with 2 additions and 2 deletions

View File

@ -68,9 +68,9 @@ func (library *libraryLinker) AndroidMk(ret *common.AndroidMkData) {
library.baseLinker.AndroidMk(ret)
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile common.Path) error {
exportedIncludes := library.exportedFlags()
var exportedIncludes []string
for _, flag := range library.exportedFlags() {
if flag != "" {
if strings.HasPrefix(flag, "-I") {
exportedIncludes = append(exportedIncludes, strings.TrimPrefix(flag, "-I"))
}
}