From ed5c14632a5dcbac894641ee40d8611d567c27e5 Mon Sep 17 00:00:00 2001 From: Chong Zhang Date: Thu, 20 Feb 2020 15:04:35 -0800 Subject: [PATCH] Add static_libs field to target.vendor test: builds with a local Android.bp that uses target.vender.static_libs Change-Id: Id1b70660ccab26025c280497916929d303d16aff --- cc/linker.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cc/linker.go b/cc/linker.go index 61ae7575a..07d41ec06 100644 --- a/cc/linker.go +++ b/cc/linker.go @@ -101,6 +101,10 @@ type BaseLinkerProperties struct { // variant of the C/C++ module. Shared_libs []string + // list of static libs that only should be used to build the vendor + // variant of the C/C++ module. + Static_libs []string + // list of shared libs that should not be used to build the vendor variant // of the C/C++ module. Exclude_shared_libs []string @@ -204,6 +208,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { deps.SharedLibs = append(deps.SharedLibs, linker.Properties.Target.Vendor.Shared_libs...) deps.SharedLibs = removeListFromList(deps.SharedLibs, linker.Properties.Target.Vendor.Exclude_shared_libs) deps.ReexportSharedLibHeaders = removeListFromList(deps.ReexportSharedLibHeaders, linker.Properties.Target.Vendor.Exclude_shared_libs) + deps.StaticLibs = append(deps.StaticLibs, linker.Properties.Target.Vendor.Static_libs...) deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Target.Vendor.Exclude_static_libs) deps.HeaderLibs = removeListFromList(deps.HeaderLibs, linker.Properties.Target.Vendor.Exclude_header_libs) deps.ReexportStaticLibHeaders = removeListFromList(deps.ReexportStaticLibHeaders, linker.Properties.Target.Vendor.Exclude_static_libs)