rust: Fix Properties inheritance for prebuilts

Previously, we had just called AddProperties inside the factory on
libraryDecorator's properties directly. This inadvertantly missed their
MutatedProperties. Inheriting properties from libraryDecorator rather
than baseCompiler will avoid that type of error in the future.

Test: cd external/rust; mma; m crosvm.experimental
Change-Id: Ic08c410e69a8e272d63f9ffbdbe16ba9c3cc3de1
This commit is contained in:
Matthew Maurer 2020-06-29 13:31:04 -07:00
parent 6bbe5774a3
commit 128f53b3b4

View file

@ -48,12 +48,11 @@ func NewPrebuiltDylib(hod android.HostOrDeviceSupported) (*Module, *prebuiltLibr
libraryDecorator: library,
}
module.compiler = prebuilt
module.AddProperties(&library.Properties)
return module, prebuilt
}
func (prebuilt *prebuiltLibraryDecorator) compilerProps() []interface{} {
return append(prebuilt.baseCompiler.compilerProps(),
return append(prebuilt.libraryDecorator.compilerProps(),
&prebuilt.Properties)
}