diff options
author | Ivan Lozano <ivanlozano@google.com> | 2021-02-05 12:27:08 -0500 |
---|---|---|
committer | Ivan Lozano <ivanlozano@google.com> | 2021-02-05 12:32:47 -0500 |
commit | fb6f36f3e40adcd3210fad714a2ffb4739a7158d (patch) | |
tree | dc13171b152f4746c74e15f5e17c5407738838a6 /rust/rust_test.go | |
parent | b3f9025b6e2ba2e34a77eb7a3b69d993839c35c3 (diff) |
rust: Only pass "-lstatic" for rlibs.
Passing '-lstatic' for dylib static dependencies results in some
unexpected bloat as the static libraries are included as
whole-archives.
For now, limit this to rlibs while we investigate.
Bug: 175886967
Bug: 179122837
Test: cd system/bt/; mma
Test: Checked size of dylibs.
Change-Id: Id8328e95771e2ca8503bc8df35248b1c39cabc8e
Diffstat (limited to 'rust/rust_test.go')
-rw-r--r-- | rust/rust_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rust/rust_test.go b/rust/rust_test.go index a32c6a7f8..88d964300 100644 --- a/rust/rust_test.go +++ b/rust/rust_test.go @@ -213,6 +213,7 @@ func TestDepsTracking(t *testing.T) { name: "librlib", srcs: ["foo.rs"], crate_name: "rlib", + static_libs: ["libstatic"], } rust_proc_macro { name: "libpm", @@ -230,7 +231,7 @@ func TestDepsTracking(t *testing.T) { } `) module := ctx.ModuleForTests("fizz-buzz", "linux_glibc_x86_64").Module().(*Module) - rustc := ctx.ModuleForTests("fizz-buzz", "linux_glibc_x86_64").Rule("rustc") + rustc := ctx.ModuleForTests("librlib", "linux_glibc_x86_64_rlib_rlib-std").Rule("rustc") // Since dependencies are added to AndroidMk* properties, we can check these to see if they've been picked up. if !android.InList("libdylib", module.Properties.AndroidMkDylibs) { |