diff options
author | Martin Stjernholm <mast@google.com> | 2021-09-06 12:40:01 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-09-06 12:40:01 +0000 |
commit | d50c559c57cf0ea180e8bb1e73abbc558bd239e2 (patch) | |
tree | 039476010c55be061bb7e6bd3848bb8ef714fcf5 | |
parent | 27a8b4640acc7e34341c572f6aa5deb5114fe4d3 (diff) | |
parent | c3d9e36be37fb80ca83c771e7cde01694cbb497a (diff) |
Merge "Add exclude_runtime_libs to more targets." into sc-qpr1-dev am: c3d9e36be3
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15727048
Change-Id: I5db34c69965d69cd3cd2c8b3edb6e2bc68834a9f
-rw-r--r-- | cc/linker.go | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/cc/linker.go b/cc/linker.go index 449b9ad96..88619f392 100644 --- a/cc/linker.go +++ b/cc/linker.go @@ -94,6 +94,9 @@ type BaseLinkerProperties struct { // vendor variants and this module uses VNDK. Runtime_libs []string `android:"arch_variant"` + // list of runtime libs that should not be installed along with this module. + Exclude_runtime_libs []string `android:"arch_variant"` + Target struct { Vendor, Product struct { // list of shared libs that only should be used to build vendor or @@ -116,8 +119,8 @@ type BaseLinkerProperties struct { // product variant of the C/C++ module. Exclude_header_libs []string - // list of runtime libs that should not be installed along with - // vendor or variant of the C/C++ module. + // list of runtime libs that should not be installed along with the + // vendor or product variant of the C/C++ module. Exclude_runtime_libs []string // version script for vendor or product variant @@ -143,6 +146,10 @@ type BaseLinkerProperties struct { // list of header libs that should not be used to build the recovery variant // of the C/C++ module. Exclude_header_libs []string + + // list of runtime libs that should not be installed along with the + // recovery variant of the C/C++ module. + Exclude_runtime_libs []string } Ramdisk struct { // list of static libs that only should be used to build the recovery @@ -156,6 +163,10 @@ type BaseLinkerProperties struct { // list of static libs that should not be used to build // the ramdisk variant of the C/C++ module. Exclude_static_libs []string + + // list of runtime libs that should not be installed along with the + // ramdisk variant of the C/C++ module. + Exclude_runtime_libs []string } Vendor_ramdisk struct { // list of shared libs that should not be used to build @@ -165,6 +176,10 @@ type BaseLinkerProperties struct { // list of static libs that should not be used to build // the vendor ramdisk variant of the C/C++ module. Exclude_static_libs []string + + // list of runtime libs that should not be installed along with the + // vendor ramdisk variant of the C/C++ module. + Exclude_runtime_libs []string } Platform struct { // list of shared libs that should be use to build the platform variant @@ -178,7 +193,7 @@ type BaseLinkerProperties struct { // the C/C++ module. Exclude_shared_libs []string - // list of static libs that should not be used to build the apex ramdisk + // list of static libs that should not be used to build the apex // variant of the C/C++ module. Exclude_static_libs []string } @@ -247,6 +262,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { deps.SharedLibs = removeListFromList(deps.SharedLibs, linker.Properties.Exclude_shared_libs) deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Exclude_static_libs) deps.WholeStaticLibs = removeListFromList(deps.WholeStaticLibs, linker.Properties.Exclude_static_libs) + deps.RuntimeLibs = removeListFromList(deps.RuntimeLibs, linker.Properties.Exclude_runtime_libs) // Record the libraries that need to be excluded when building for APEX. Unlike other // target.*.exclude_* properties, SharedLibs and StaticLibs are not modified here because @@ -296,6 +312,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { 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) + deps.RuntimeLibs = removeListFromList(deps.RuntimeLibs, linker.Properties.Target.Recovery.Exclude_runtime_libs) } if ctx.inRamdisk() { @@ -305,6 +322,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Target.Ramdisk.Exclude_static_libs) deps.ReexportStaticLibHeaders = removeListFromList(deps.ReexportStaticLibHeaders, linker.Properties.Target.Ramdisk.Exclude_static_libs) deps.WholeStaticLibs = removeListFromList(deps.WholeStaticLibs, linker.Properties.Target.Ramdisk.Exclude_static_libs) + deps.RuntimeLibs = removeListFromList(deps.RuntimeLibs, linker.Properties.Target.Ramdisk.Exclude_runtime_libs) } if ctx.inVendorRamdisk() { @@ -313,6 +331,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Target.Vendor_ramdisk.Exclude_static_libs) deps.ReexportStaticLibHeaders = removeListFromList(deps.ReexportStaticLibHeaders, linker.Properties.Target.Vendor_ramdisk.Exclude_static_libs) deps.WholeStaticLibs = removeListFromList(deps.WholeStaticLibs, linker.Properties.Target.Vendor_ramdisk.Exclude_static_libs) + deps.RuntimeLibs = removeListFromList(deps.RuntimeLibs, linker.Properties.Target.Vendor_ramdisk.Exclude_runtime_libs) } if !ctx.useSdk() { |