diff options
author | 2021-11-03 15:30:18 -0400 | |
---|---|---|
committer | 2021-11-03 15:34:50 -0400 | |
commit | 7b0781d14c9054552ce5f83420ac92fda1d31e8b (patch) | |
tree | 889cd0a1f4404d198dbe1e8703d5216edd6a241d /rust/androidmk.go | |
parent | a3bd96398837b2e758ca8f9cf3c7e5cc6338c8a9 (diff) |
rust: Emit toc files for cdylibs
Write toc files that list the exported symbols so dependents are
only rebuilt if the exported symbols change.
This exports the CC function TransformSharedObjectToToc, and also
removes an unused arg from its signature.
Bug: 178185435
Test: New Soong test passes.
Test: m <toc file path>
Change-Id: I7ab69bf7e7f32f25eb4c7ca9d18d877dac1511db
Diffstat (limited to 'rust/androidmk.go')
-rw-r--r-- | rust/androidmk.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rust/androidmk.go b/rust/androidmk.go index 630805a85..e429416ab 100644 --- a/rust/androidmk.go +++ b/rust/androidmk.go @@ -137,12 +137,16 @@ func (library *libraryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.An } else if library.shared() { ret.Class = "SHARED_LIBRARIES" } - if library.distFile.Valid() { ret.DistFiles = android.MakeDefaultDistFiles(library.distFile.Path()) } + ret.ExtraEntries = append(ret.ExtraEntries, + func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) { + if library.tocFile.Valid() { + entries.SetString("LOCAL_SOONG_TOC", library.tocFile.String()) + } + }) } - func (procMacro *procMacroDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkEntries) { ctx.SubAndroidMk(ret, procMacro.baseCompiler) |