Allow cc_object to use libc headers under the VNDK
Bionic headers aren't implicit when building with the VNDK, they're exported from libc. So add libc to the shared libraries of a cc_object if it wants the standard flags. Removes a duplicate No_default_compiler_flags Test: Add cc_object with vendor_available, build on aosp_arm64_ab (VNDK-enabled) Change-Id: I9bfcd1e1a65de4edc597bd348b79d625ecae4f5e
This commit is contained in:
@@ -53,6 +53,11 @@ func (object *objectLinker) linkerProps() []interface{} {
|
||||
func (*objectLinker) linkerInit(ctx BaseModuleContext) {}
|
||||
|
||||
func (object *objectLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
|
||||
if !ctx.noDefaultCompilerFlags() && ctx.toolchain().Bionic() {
|
||||
// Needed for VNDK builds where bionic headers aren't automatically added.
|
||||
deps.LateSharedLibs = append(deps.LateSharedLibs, "libc")
|
||||
}
|
||||
|
||||
deps.ObjFiles = append(deps.ObjFiles, object.Properties.Objs...)
|
||||
return deps
|
||||
}
|
||||
|
Reference in New Issue
Block a user