From 0098166cb426feb527d144f9108407f2cc68690a Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Mon, 13 Aug 2018 16:02:49 -0700 Subject: [PATCH] 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 --- cc/prebuilt.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/cc/prebuilt.go b/cc/prebuilt.go index 3f277aa3d..3dd4d11dd 100644 --- a/cc/prebuilt.go +++ b/cc/prebuilt.go @@ -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