From d1f898e70abf0e750ae351689a6291700ff8739c Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 18 Aug 2020 18:35:15 -0700 Subject: Remove global state from version mutator A per-context variable is used to store the list of modules that contain stubs and their available versions. Stores the list of the stubs versions on the implementation module, and then use the new return values from AddVariationDependencies to expand dependencies on implementation libraries to also depend on the stubs libraries. Adds a new mutator pass to propagate list of stub versions to llndk libraries. Also creates an alias version variation called "latest" to allow depending on the latest version without having to know what it is. Test: all Soong tests Test: no change to build.ninja, Android-${TARGET_PRODUCT}.mk, make_vars-${TARGET_PRODUCT}.mk or late-${TARGET_PRODUCT}.mk Change-Id: If19659e2e5828c860fd4d679ef79a414b7ea2efc --- rust/rust.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'rust/rust.go') diff --git a/rust/rust.go b/rust/rust.go index 4cba6d6b1..92be0f3ab 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -458,12 +458,20 @@ func (mod *Module) SetBuildStubs() { panic("SetBuildStubs not yet implemented for rust modules") } -func (mod *Module) SetStubsVersions(string) { - panic("SetStubsVersions not yet implemented for rust modules") +func (mod *Module) SetStubsVersion(string) { + panic("SetStubsVersion not yet implemented for rust modules") } func (mod *Module) StubsVersion() string { - panic("SetStubsVersions not yet implemented for rust modules") + panic("StubsVersion not yet implemented for rust modules") +} + +func (mod *Module) SetAllStubsVersions([]string) { + panic("SetAllStubsVersions not yet implemented for rust modules") +} + +func (mod *Module) AllStubsVersions() []string { + return nil } func (mod *Module) BuildStaticVariant() bool { -- cgit v1.2.3-59-g8ed1b