Move global cppflags to the beginning of cppflags

am: b668826a85

Change-Id: Ia93b79e1c73dafdc9c2887af97d62e45681193d6
This commit is contained in:
Colin Cross 2016-11-25 18:25:37 +00:00 committed by android-build-merger
commit 88d3652f37

View file

@ -245,17 +245,17 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag
if !ctx.noDefaultCompilerFlags() {
flags.GlobalFlags = append(flags.GlobalFlags, instructionSetFlags)
flags.ConlyFlags = append(flags.ConlyFlags, "${config.CommonGlobalConlyflags}")
flags.ConlyFlags = append([]string{"${config.CommonGlobalConlyflags}"}, flags.ConlyFlags...)
if flags.Clang {
flags.AsFlags = append(flags.AsFlags, tc.ClangAsflags())
flags.CppFlags = append(flags.CppFlags, "${config.CommonClangGlobalCppflags}")
flags.CppFlags = append([]string{"${config.CommonClangGlobalCppflags}"}, flags.CppFlags...)
flags.GlobalFlags = append(flags.GlobalFlags,
tc.ClangCflags(),
"${config.CommonClangGlobalCflags}",
fmt.Sprintf("${config.%sClangGlobalCflags}", hod))
} else {
flags.CppFlags = append(flags.CppFlags, "${config.CommonGlobalCppflags}")
flags.CppFlags = append([]string{"${config.CommonGlobalCppflags}"}, flags.CppFlags...)
flags.GlobalFlags = append(flags.GlobalFlags,
tc.Cflags(),
"${config.CommonGlobalCflags}",