Add common cpp flags

Change-Id: Iba486b121e9a1b0c1761cf6402c61a0228105a5b
This commit is contained in:
Tim Kilbourn 2015-03-11 12:03:03 -07:00
parent 8003131d5a
commit f294814398
1 changed files with 4 additions and 0 deletions

View File

@ -86,6 +86,8 @@ func init() {
strings.Join(clangFilterUnknownCflags(deviceGlobalCflags), " "))
pctx.StaticVariable("hostClangGlobalCflags",
strings.Join(clangFilterUnknownCflags(hostGlobalCflags), " "))
pctx.StaticVariable("commonClangGlobalCppflags",
strings.Join(clangFilterUnknownCflags(commonGlobalCppflags), " "))
// Everything in this list is a crime against abstraction and dependency tracking.
// Do not add anything to this list.
@ -387,6 +389,7 @@ func (c *ccBase) flags(ctx common.AndroidModuleContext, toolchain toolchain) ccF
}
if flags.clang {
flags.cppFlags = append(flags.cppFlags, "${commonClangGlobalCppflags}")
flags.globalFlags = []string{
"${commonGlobalIncludes}",
toolchain.IncludeFlags(),
@ -395,6 +398,7 @@ func (c *ccBase) flags(ctx common.AndroidModuleContext, toolchain toolchain) ccF
fmt.Sprintf("${%sClangGlobalCflags}", arch.HostOrDevice),
}
} else {
flags.cppFlags = append(flags.cppFlags, "${commonGlobalCppflags}")
flags.globalFlags = []string{
"${commonGlobalIncludes}",
toolchain.IncludeFlags(),