summaryrefslogtreecommitdiff
path: root/rust/androidmk.go
diff options
context:
space:
mode:
author Jiyong Park <jiyong@google.com> 2021-04-07 15:08:04 +0900
committer Jiyong Park <jiyong@google.com> 2021-04-07 22:23:31 +0900
commite54f07e38a40dffcdec52f21a745efcf1b055902 (patch)
tree0c5ea6373ed9cc3b55798904be2c0b13ded5c13c /rust/androidmk.go
parent0774773a65c2b4164c725ca00b5fad88048f6259 (diff)
Stripped rust bin/libs are included in APEX
Previously, when a rust bin or library is selected for an APEX, OutputFile() was used to get the file to be used. However, OutputFile() always returns the unstripped output file even when the stripped output file is available. As a result, APEX having a rust module was very big due to the debugging information that exists in the unstripped file. When a rust module is directly installed to the built-in partitions, we use the stripped one whenever it's available. To make the same happen when the rust module is placed in an APEX, OutputFile() is modified to return the unstripped output if it's available. Bug: 181751814 Test: TARGET_BUILD_APPS=com.android.virt m The size is reduced from 180MB to 43MB Change-Id: I6f8479e6a4794aac8bf94a84afdf65d417c75db0
Diffstat (limited to 'rust/androidmk.go')
-rw-r--r--rust/androidmk.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/androidmk.go b/rust/androidmk.go
index 0f9a17d99..b0e69677a 100644
--- a/rust/androidmk.go
+++ b/rust/androidmk.go
@@ -50,7 +50,7 @@ func (mod *Module) AndroidMkEntries() []android.AndroidMkEntries {
}
ret := android.AndroidMkEntries{
- OutputFile: mod.outputFile,
+ OutputFile: mod.unstrippedOutputFile,
Include: "$(BUILD_SYSTEM)/soong_rust_prebuilt.mk",
ExtraEntries: []android.AndroidMkExtraEntriesFunc{
func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {