From e7efbc8c785c5f8974cd827662bfdcece18a71ef Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Thu, 1 Aug 2019 13:45:42 -0700 Subject: [PATCH] Add cc_*.target.recovery.static_libs Test: use static_libs in target.recovery Change-Id: Ib2a10d09e205932be83e74274a641fd8544f7188 --- cc/linker.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cc/linker.go b/cc/linker.go index dda2fcb33..b5b500ea5 100644 --- a/cc/linker.go +++ b/cc/linker.go @@ -125,6 +125,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 recovery + // variant of the C/C++ module. + Static_libs []string + // list of shared libs that should not be used to build // the recovery variant of the C/C++ module. Exclude_shared_libs []string @@ -214,6 +218,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { deps.SharedLibs = append(deps.SharedLibs, linker.Properties.Target.Recovery.Shared_libs...) deps.SharedLibs = removeListFromList(deps.SharedLibs, linker.Properties.Target.Recovery.Exclude_shared_libs) deps.ReexportSharedLibHeaders = removeListFromList(deps.ReexportSharedLibHeaders, linker.Properties.Target.Recovery.Exclude_shared_libs) + deps.StaticLibs = append(deps.StaticLibs, linker.Properties.Target.Recovery.Static_libs...) deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Target.Recovery.Exclude_static_libs) deps.HeaderLibs = removeListFromList(deps.HeaderLibs, linker.Properties.Target.Recovery.Exclude_header_libs) deps.ReexportHeaderLibHeaders = removeListFromList(deps.ReexportHeaderLibHeaders, linker.Properties.Target.Recovery.Exclude_header_libs)