diff options
Diffstat (limited to 'rust/library.go')
-rw-r--r-- | rust/library.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/rust/library.go b/rust/library.go index 77280d959..95e7099a6 100644 --- a/rust/library.go +++ b/rust/library.go @@ -858,6 +858,20 @@ func (library *libraryDecorator) SetDisabled() { library.MutatedProperties.VariantIsDisabled = true } +func (library *libraryDecorator) moduleInfoJSON(ctx ModuleContext, moduleInfoJSON *android.ModuleInfoJSON) { + library.baseCompiler.moduleInfoJSON(ctx, moduleInfoJSON) + + if library.rlib() { + moduleInfoJSON.Class = []string{"RLIB_LIBRARIES"} + } else if library.dylib() { + moduleInfoJSON.Class = []string{"DYLIB_LIBRARIES"} + } else if library.static() { + moduleInfoJSON.Class = []string{"STATIC_LIBRARIES"} + } else if library.shared() { + moduleInfoJSON.Class = []string{"SHARED_LIBRARIES"} + } +} + var validCrateName = regexp.MustCompile("[^a-zA-Z0-9_]+") func validateLibraryStem(ctx BaseModuleContext, filename string, crate_name string) { |