summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2022-01-16 14:03:33 -0800
committerLinux Build Service Account <lnxbuild@localhost>2022-01-16 14:03:33 -0800
commitcb9c32d0debd49106fa28ecf7433b3cfbdb6b940 (patch)
treeaa0ba4b94adf222b3ff52945fa72c0d26cf44d91
parenteef951fd34d4a1de3950277dc5bc1ebae99c30fc (diff)
parentc830ac4d91b9b4f71b05a4c712de643cdaf75062 (diff)
Merge c830ac4d91b9b4f71b05a4c712de643cdaf75062 on remote branch
Change-Id: I68dc7c4563cbddf15692972ed1570cdfb74a13a8
-rw-r--r--cc/linker.go25
-rw-r--r--cmd/soong_ui/main.go3
2 files changed, 23 insertions, 5 deletions
diff --git a/cc/linker.go b/cc/linker.go
index a62e24f74..d39ef5e8c 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 shared libs that only should be used to build the ramdisk
@@ -161,6 +168,10 @@ type BaseLinkerProperties struct {
// 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
+
// list of header libs that should not be used to build the ramdisk variant
// of the C/C++ module.
Exclude_header_libs []string
@@ -173,6 +184,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
@@ -186,7 +201,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
}
@@ -255,6 +270,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
@@ -304,6 +320,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() {
@@ -316,6 +333,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
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.RuntimeLibs = removeListFromList(deps.RuntimeLibs, linker.Properties.Target.Ramdisk.Exclude_runtime_libs)
}
if ctx.inVendorRamdisk() {
@@ -324,6 +342,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() {
diff --git a/cmd/soong_ui/main.go b/cmd/soong_ui/main.go
index 8bcc71202..02c522977 100644
--- a/cmd/soong_ui/main.go
+++ b/cmd/soong_ui/main.go
@@ -205,13 +205,12 @@ func main() {
Status: stat,
}}
- config := c.config(buildCtx, args...)
-
if err := loadEnvConfig(); err != nil {
fmt.Fprintf(os.Stderr, "failed to parse env config files: %v", err)
os.Exit(1)
}
+ config := c.config(buildCtx, args...)
build.SetupOutDir(buildCtx, config)