From 280febfb14dd25c69792fbe784b06c5a86e98c18 Mon Sep 17 00:00:00 2001 From: Hridya Valsaraju Date: Fri, 10 Aug 2018 09:08:13 -0700 Subject: [PATCH] Add exclude_header_libs for recovery_available:true libs Bug: 78793464 Test: mmm libhardware needs to be made available in recovery without exporting bluetooth and audio headers. Change-Id: Ib1d1bcda49abccfb9a4768580e1c1d92ead68773 --- cc/linker.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cc/linker.go b/cc/linker.go index 3620f59ad..9911b1659 100644 --- a/cc/linker.go +++ b/cc/linker.go @@ -119,6 +119,10 @@ type BaseLinkerProperties struct { // list of static libs that should not be used to build // the recovery variant of the C/C++ module. Exclude_static_libs []string + + // list of header libs that should not be used to build the recovery variant + // of the C/C++ module. + Exclude_header_libs []string } } @@ -204,6 +208,8 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { 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 = 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) deps.ReexportStaticLibHeaders = removeListFromList(deps.ReexportStaticLibHeaders, linker.Properties.Target.Recovery.Exclude_static_libs) deps.WholeStaticLibs = removeListFromList(deps.WholeStaticLibs, linker.Properties.Target.Recovery.Exclude_static_libs) }