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
diff --git a/rust/prebuilt.go b/rust/prebuilt.go
index 1d97650..a7f6c09 100644
--- a/rust/prebuilt.go
+++ b/rust/prebuilt.go
@@ -48,12 +48,11 @@
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)
}