Split CommonGlobalIncludes for system includes

Split CommonGlobalSystemIncludes out of CommonGlobalIncludes in
preparation for moving global includes from -isystem to -I.

Bug: 31492149
Change-Id: Ib935ea038cdbf9515dc2ab68d7fff924c370906a
This commit is contained in:
Colin Cross 2016-09-15 09:30:46 -07:00
parent 98e7e66cb6
commit 1cfd89aca3
3 changed files with 6 additions and 3 deletions

View file

@ -147,6 +147,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag
if !ctx.sdk() || ctx.Host() {
flags.GlobalFlags = append(flags.GlobalFlags,
"${config.CommonGlobalIncludes}",
"${config.CommonGlobalSystemIncludes}",
tc.IncludeFlags(),
"${config.CommonNativehelperInclude}")
}

View file

@ -90,9 +90,11 @@ func init() {
pctx.StaticVariable("CommonClangGlobalCppflags",
strings.Join(append(ClangFilterUnknownCflags(commonGlobalCppflags), "${ClangExtraCppflags}"), " "))
// Everything in this list is a crime against abstraction and dependency tracking.
// Everything in these lists is a crime against abstraction and dependency tracking.
// Do not add anything to this list.
pctx.PrefixedPathsForOptionalSourceVariable("CommonGlobalIncludes", "-isystem ",
pctx.PrefixedPathsForOptionalSourceVariable("CommonGlobalIncludes", "-I",
[]string{})
pctx.PrefixedPathsForOptionalSourceVariable("CommonGlobalSystemIncludes", "-isystem ",
[]string{
"system/core/include",
"system/media/audio/include",

View file

@ -44,7 +44,7 @@ func makeVarsProvider(ctx android.MakeVarsContext) {
ctx.Strict("GLOBAL_CLANG_CPPFLAGS_NO_OVERRIDE", "")
ctx.Strict("NDK_PREBUILT_SHARED_LIBRARIES", strings.Join(ndkPrebuiltSharedLibs, " "))
includeFlags, err := ctx.Eval("${config.CommonGlobalIncludes}")
includeFlags, err := ctx.Eval("${config.CommonGlobalIncludes} ${config.CommonGlobalSystemIncludes}")
if err != nil {
panic(err)
}