Prebuilts shouldn't inherit linker interface

Prebuilts doesn't go through linking stage, thus it should not inherit
any dependencies or flags from linker.go.

Test: m checkbuild
Bug: 29275768
Change-Id: I1f1dc5d65c2fc2dd905e8df44e08d5c83b224d0c
This commit is contained in:
Yi Kong 2018-08-13 16:02:49 -07:00
parent b69575b1f6
commit 0098166cb4
1 changed files with 18 additions and 0 deletions

View File

@ -51,6 +51,24 @@ type prebuiltLibraryLinker struct {
var _ prebuiltLinkerInterface = (*prebuiltLibraryLinker)(nil)
func (p *prebuiltLibraryLinker) linkerInit(ctx BaseModuleContext) {}
func (p *prebuiltLibraryLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
// export_header_lib_headers needs to be passed along
return Deps{
HeaderLibs: p.baseLinker.Properties.Header_libs,
ReexportHeaderLibHeaders: p.baseLinker.Properties.Export_header_lib_headers,
}
}
func (p *prebuiltLibraryLinker) linkerFlags(ctx ModuleContext, flags Flags) Flags {
return Flags{}
}
func (p *prebuiltLibraryLinker) linkerProps() []interface{} {
return p.libraryDecorator.linkerProps()
}
func (p *prebuiltLibraryLinker) link(ctx ModuleContext,
flags Flags, deps PathDeps, objs Objects) android.Path {
// TODO(ccross): verify shared library dependencies