Merge "Add exclude_runtime_libs to more targets."

This commit is contained in:
Nicolas Geoffray
2021-08-27 11:33:39 +00:00
committed by Gerrit Code Review

View File

@@ -95,6 +95,9 @@ type BaseLinkerProperties struct {
// vendor variants and this module uses VNDK. // vendor variants and this module uses VNDK.
Runtime_libs []string `android:"arch_variant"` 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 { Target struct {
Vendor, Product struct { Vendor, Product struct {
// list of shared libs that only should be used to build vendor or // list of shared libs that only should be used to build vendor or
@@ -121,8 +124,8 @@ type BaseLinkerProperties struct {
// product variant of the C/C++ module. // product variant of the C/C++ module.
Exclude_header_libs []string Exclude_header_libs []string
// list of runtime libs that should not be installed along with // list of runtime libs that should not be installed along with the
// vendor or variant of the C/C++ module. // vendor or product variant of the C/C++ module.
Exclude_runtime_libs []string Exclude_runtime_libs []string
// version script for vendor or product variant // version script for vendor or product variant
@@ -148,6 +151,10 @@ type BaseLinkerProperties struct {
// list of header libs that should not be used to build the recovery variant // list of header libs that should not be used to build the recovery variant
// of the C/C++ module. // of the C/C++ module.
Exclude_header_libs []string 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 { Ramdisk struct {
// list of static libs that only should be used to build the recovery // list of static libs that only should be used to build the recovery
@@ -161,6 +168,10 @@ type BaseLinkerProperties struct {
// list of static libs that should not be used to build // list of static libs that should not be used to build
// the ramdisk variant of the C/C++ module. // the ramdisk variant of the C/C++ module.
Exclude_static_libs []string 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 { Vendor_ramdisk struct {
// list of shared libs that should not be used to build // list of shared libs that should not be used to build
@@ -170,6 +181,10 @@ type BaseLinkerProperties struct {
// list of static libs that should not be used to build // list of static libs that should not be used to build
// the vendor ramdisk variant of the C/C++ module. // the vendor ramdisk variant of the C/C++ module.
Exclude_static_libs []string 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 { Platform struct {
// list of shared libs that should be use to build the platform variant // list of shared libs that should be use to build the platform variant
@@ -191,7 +206,7 @@ type BaseLinkerProperties struct {
// the C/C++ module. // the C/C++ module.
Exclude_shared_libs []string 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. // variant of the C/C++ module.
Exclude_static_libs []string Exclude_static_libs []string
} }
@@ -275,6 +290,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
deps.SharedLibs = removeListFromList(deps.SharedLibs, linker.Properties.Exclude_shared_libs) deps.SharedLibs = removeListFromList(deps.SharedLibs, linker.Properties.Exclude_shared_libs)
deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Exclude_static_libs) deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Exclude_static_libs)
deps.WholeStaticLibs = removeListFromList(deps.WholeStaticLibs, 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 // 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 // target.*.exclude_* properties, SharedLibs and StaticLibs are not modified here because
@@ -325,6 +341,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
deps.ReexportHeaderLibHeaders = removeListFromList(deps.ReexportHeaderLibHeaders, 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.ReexportStaticLibHeaders = removeListFromList(deps.ReexportStaticLibHeaders, linker.Properties.Target.Recovery.Exclude_static_libs)
deps.WholeStaticLibs = removeListFromList(deps.WholeStaticLibs, 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() { if ctx.inRamdisk() {
@@ -334,6 +351,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Target.Ramdisk.Exclude_static_libs) 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.ReexportStaticLibHeaders = removeListFromList(deps.ReexportStaticLibHeaders, linker.Properties.Target.Ramdisk.Exclude_static_libs)
deps.WholeStaticLibs = removeListFromList(deps.WholeStaticLibs, 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() { if ctx.inVendorRamdisk() {
@@ -342,6 +360,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Target.Vendor_ramdisk.Exclude_static_libs) 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.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.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() { if !ctx.useSdk() {