Simplify flags in c compiling, fix NDK build warnings

Reduce the number of flags variables when compiling C by getting
rid of the separately-tracked IncludeDirs variables, and putting
them directly in GlobalFlags.  Also changes exportedIncludeDirs
to exportedFlags, which will allow exporting flags besides -I.

Also fixes a bug when building a module with the NDK and -Werror
by passing NDK exported include directories with -isystem instead
of -I, which will ignore warnings from those includes.

Also fixes a bug where the default includes were being inserted
into all cflags by the arm and arm64 toolchain modules.

Change-Id: Ice97f84e637b21d20c38c85b881afa315f9f92ae
This commit is contained in:
Colin Cross
2015-04-22 13:07:53 -07:00
parent 56b4d45341
commit 28344528cf
5 changed files with 89 additions and 95 deletions

View File

@@ -77,8 +77,6 @@ func ccFlagsToBuilderFlags(in CCFlags) builderFlags {
cppFlags: strings.Join(in.CppFlags, " "),
yaccFlags: strings.Join(in.YaccFlags, " "),
ldFlags: strings.Join(in.LdFlags, " "),
ldLibs: strings.Join(in.LdLibs, " "),
incFlags: includeDirsToFlags(in.IncludeDirs),
nocrt: in.Nocrt,
toolchain: in.Toolchain,
clang: in.Clang,