From e54f07e38a40dffcdec52f21a745efcf1b055902 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Wed, 7 Apr 2021 15:08:04 +0900 Subject: 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 --- rust/androidmk.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rust/androidmk.go') 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) { -- cgit v1.2.3-59-g8ed1b