From c7a4688b9dcc88b40d4aeed2ed08186f8ed6ed6a Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Thu, 2 Feb 2023 11:33:39 +0900 Subject: [PATCH] Symbol files for Rust binaries in APEXes are exported Bug: 228083190 Test: build and check symbols/apex/com.android.virt/bin/crosvm exists. Change-Id: Id8b401723791d13dfc68c8e6972e73f875292924 --- apex/androidmk.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apex/androidmk.go b/apex/androidmk.go index aadccb724..d94711bff 100644 --- a/apex/androidmk.go +++ b/apex/androidmk.go @@ -23,6 +23,7 @@ import ( "android/soong/android" "android/soong/cc" "android/soong/java" + "android/soong/rust" "github.com/google/blueprint/proptools" ) @@ -256,6 +257,10 @@ func (a *apexBundle) androidMkForFiles(w io.Writer, apexBundleName, apexName, mo if ccMod.CoverageOutputFile().Valid() { fmt.Fprintln(w, "LOCAL_PREBUILT_COVERAGE_ARCHIVE :=", ccMod.CoverageOutputFile().String()) } + } else if rustMod, ok := fi.module.(*rust.Module); ok { + if rustMod.UnstrippedOutputFile() != nil { + fmt.Fprintln(w, "LOCAL_SOONG_UNSTRIPPED_BINARY :=", rustMod.UnstrippedOutputFile().String()) + } } fmt.Fprintln(w, "include $(BUILD_SYSTEM)/soong_cc_rust_prebuilt.mk") default: