Add global C flags to compile_commands
This solves linter warnings in editor by adding flags to ignore errors we don't care about. This also means that compile_commands.json is closer to the flags we actually use for compilation. Test: Checked generated compile_commands for new flags. Change-Id: Id583da6eb5151a9baa9a47771f5f937c88bc43f7
This commit is contained in:
@@ -539,7 +539,6 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
|
||||
flags.Global.CommonFlags = append(flags.Global.CommonFlags, tc.ToolchainCflags())
|
||||
}
|
||||
|
||||
|
||||
cStd := parseCStd(compiler.Properties.C_std)
|
||||
cppStd := parseCppStd(compiler.Properties.Cpp_std)
|
||||
|
||||
@@ -671,6 +670,16 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
|
||||
flags.Local.CFlags = append(flags.Local.CFlags, "-DDO_NOT_CHECK_MANUAL_BINDER_INTERFACES")
|
||||
}
|
||||
|
||||
flags.NoOverrideFlags = append(flags.NoOverrideFlags, "${config.NoOverrideGlobalCflags}")
|
||||
|
||||
if flags.Toolchain.Is64Bit() {
|
||||
flags.NoOverrideFlags = append(flags.NoOverrideFlags, "${config.NoOverride64GlobalCflags}")
|
||||
}
|
||||
|
||||
if android.IsThirdPartyPath(ctx.ModuleDir()) {
|
||||
flags.NoOverrideFlags = append(flags.NoOverrideFlags, "${config.NoOverrideExternalGlobalCflags}")
|
||||
}
|
||||
|
||||
return flags
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user