Add to cflags in compilerFlags()
These compiler flags weren't being properly added to ToolingCFlags,
which was causing clang-tidy to complain a lot about incompatible
redeclarations of library functions. Moving them to compilerFlags()
causes them to be added to ToolingCFlags.
Bug: None
Test: mma in bionic/. clang-tidy now shows 7,142 fewer high-severity
warnings.
Change-Id: If5148858d9db143a3dd9b0ce6c970258ec4ff9cb
diff --git a/cc/llndk_library.go b/cc/llndk_library.go
index 66ffc9f..c3d3462 100644
--- a/cc/llndk_library.go
+++ b/cc/llndk_library.go
@@ -61,6 +61,11 @@
versionScriptPath android.ModuleGenPath
}
+func (stub *llndkStubDecorator) compilerFlags(ctx ModuleContext, flags Flags) Flags {
+ flags = stub.baseCompiler.compilerFlags(ctx, flags)
+ return addStubLibraryCompilerFlags(flags)
+}
+
func (stub *llndkStubDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) Objects {
objs, versionScript := compileStubLibrary(ctx, flags, stub.Properties.Symbol_file, "current", "--vndk")
stub.versionScriptPath = versionScript